aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-02 11:16:37 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-02 11:16:37 +0300
commit62de256539511038bb899eb85d3b931dfe1f4c4d (patch)
tree6a49bc4687c89508fff6c9f7c681cb11fc3bb3ea /backend
parentfeat: testing logging system (#55) (diff)
downloadlphub-62de256539511038bb899eb85d3b931dfe1f4c4d.tar.gz
lphub-62de256539511038bb899eb85d3b931dfe1f4c4d.tar.bz2
lphub-62de256539511038bb899eb85d3b931dfe1f4c4d.zip
fix: actually pass the parameters for insert (#55)
Former-commit-id: 5b532bdc1797151e3d5fbfa365c5126d1f8bab71
Diffstat (limited to 'backend')
-rw-r--r--backend/handlers/logs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/handlers/logs.go b/backend/handlers/logs.go
index 2b5713d..3eadbb0 100644
--- a/backend/handlers/logs.go
+++ b/backend/handlers/logs.go
@@ -106,7 +106,7 @@ func ScoreLogs(c *gin.Context) {
106 106
107func CreateLog(user_id string, log_type string, log_description string) (err error) { 107func CreateLog(user_id string, log_type string, log_description string) (err error) {
108 sql := `INSERT INTO logs (user_id, "type", description) VALUES($1, $2, $3)` 108 sql := `INSERT INTO logs (user_id, "type", description) VALUES($1, $2, $3)`
109 _, err = database.DB.Exec(sql) 109 _, err = database.DB.Exec(sql, user_id, log_type, log_description)
110 if err != nil { 110 if err != nil {
111 return err 111 return err
112 } 112 }