about summary refs log tree commit diff
path: root/src/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.go')
-rw-r--r--src/db.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db.go b/src/db.go
index 0c2e04b..e9b127c 100644
--- a/src/db.go
+++ b/src/db.go
@@ -100,7 +100,10 @@ func dbNewChallenge(challenge Challenge) (string, error) {
 func dbEditChallengeUUID(uuid string, updatedChallenge Challenge) error {
 	query := fmt.Sprintf("UPDATE challenges SET name = '%s', description = '%s', flag = '%s', container = '%s', category = '%s', points = %d, static = %t WHERE uuid::text = '%s'", updatedChallenge.Name, updatedChallenge.Description, updatedChallenge.Flag, updatedChallenge.Container, updatedChallenge.Category, updatedChallenge.Points, updatedChallenge.Static, updatedChallenge.UUID)
 
-	_, _ = db.Exec(query)
+	_, err := db.Exec(query)
+	if err != nil {
+		return err
+	}
 
 	return nil
 }