i put the panic() in the wrong side of the if lol
This commit is contained in:
parent
8ad72af294
commit
f3f9142f0a
1 changed files with 1 additions and 2 deletions
|
@ -26,10 +26,9 @@ func main() {
|
|||
err := db.QueryRow("SELECT verification_code FROM pending_accounts WHERE number = $1", account).Scan(&code)
|
||||
log.Printf("Looking for verification code for %s", account)
|
||||
if err != nil {
|
||||
fmt.Fprintf(w, "An error occured: %s\n", err)
|
||||
panic(err)
|
||||
} else {
|
||||
fmt.Fprintf(w, "%s\n", code)
|
||||
panic(err)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue