diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-02 11:16:37 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-02 11:16:37 +0300 |
| commit | 62de256539511038bb899eb85d3b931dfe1f4c4d (patch) | |
| tree | 6a49bc4687c89508fff6c9f7c681cb11fc3bb3ea /backend | |
| parent | feat: testing logging system (#55) (diff) | |
| download | lphub-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.go | 2 |
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 | ||
| 107 | func CreateLog(user_id string, log_type string, log_description string) (err error) { | 107 | func 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 | } |