diff options
author | Emile <hanemile@protonmail.com> | 2019-10-26 16:53:51 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-26 16:53:51 +0200 |
commit | a3fc010ac1c08ac475eefd7d60ff684b075ce2c9 (patch) | |
tree | 2c42e4c4c38b78457ebd7b82ba6f8ae580f5f7c2 /src | |
parent | 8b72235a26ed77111e3706f9231aaeb6c0a549a1 (diff) |
one value instead of two
Diffstat (limited to 'src')
-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 5fd6068..3601b1b 100644 --- a/src/db.go +++ b/src/db.go @@ -115,10 +115,10 @@ 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 + return fmt.Errorf("could not edit the challenge: %s", err) } return nil |