diff options
author | Emile <hanemile@protonmail.com> | 2019-10-26 16:44:13 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-26 16:44:13 +0200 |
commit | 8b72235a26ed77111e3706f9231aaeb6c0a549a1 (patch) | |
tree | 5baac1ec263bfe6534735916f2d5c2146f238809 | |
parent | 122aad446156d85fa0a41b056a8c87ed60cb8696 (diff) |
fixed errors
-rw-r--r-- | src/db.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db.go b/src/db.go index 94e317c..5fd6068 100644 --- a/src/db.go +++ b/src/db.go @@ -115,7 +115,7 @@ func dbEditChallengeUUID(uuid string, updatedChallenge Challenge) error { query := fmt.Sprintf("UPDATE challenges SET name = '$1', description = '$2', flag = '$3', container = '$4', category = '$5', points = $6, static = $7 WHERE uuid::text = '$8'") - err := db.QueryRow(query, updatedChallenge.Name, updatedChallenge.Description, updatedChallenge.Flag, updatedChallenge.Container, updatedChallenge.Category, updatedChallenge.Points, updatedChallenge.Static, updatedChallenge.UUID) + _, err := db.QueryRow(query, updatedChallenge.Name, updatedChallenge.Description, updatedChallenge.Flag, updatedChallenge.Container, updatedChallenge.Category, updatedChallenge.Points, updatedChallenge.Static, updatedChallenge.UUID) if err != nil { return err @@ -143,7 +143,7 @@ func dbGetChallengeByUUID(uuid string) (Challenge, error) { func dbDeleteChallengeByUUID(uuid string) error { query := fmt.Sprintf("DELETE FROM challenges WHERE uuid::text = '%s'") - err = db.QueryRow(query, uuid) + err := db.QueryRow(query, uuid) if err != nil { return err } |