diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-28 18:49:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-28 18:49:17 +0300 |
| commit | 4ba6cecbb20a5af1e598a2d67f3d2476a2b1f5e1 (patch) | |
| tree | 4f88bd2105b54259c452e88cdef052c9d924b1bc /backend/handlers | |
| parent | fix: actually get log message in modlogs (#110) (diff) | |
| download | lphub-4ba6cecbb20a5af1e598a2d67f3d2476a2b1f5e1.tar.gz lphub-4ba6cecbb20a5af1e598a2d67f3d2476a2b1f5e1.tar.bz2 lphub-4ba6cecbb20a5af1e598a2d67f3d2476a2b1f5e1.zip | |
feat: add is_deleted data to map summary (#109)
Former-commit-id: de8434e14fc35df28e2cc5ed0c4f31bfa741c7d6
Diffstat (limited to 'backend/handlers')
| -rw-r--r-- | backend/handlers/map.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/handlers/map.go b/backend/handlers/map.go index c0776d1..954d720 100644 --- a/backend/handlers/map.go +++ b/backend/handlers/map.go | |||
| @@ -71,12 +71,12 @@ func FetchMapSummary(c *gin.Context) { | |||
| 71 | } | 71 | } |
| 72 | // Get map data | 72 | // Get map data |
| 73 | response.Map.ID = intID | 73 | response.Map.ID = intID |
| 74 | sql := `SELECT m.id, g.name, c.name, m.name, m.image, g.is_coop | 74 | sql := `SELECT m.id, g.name, c.name, m.name, m.image, g.is_coop, m.is_disabled |
| 75 | FROM maps m | 75 | FROM maps m |
| 76 | INNER JOIN games g ON m.game_id = g.id | 76 | INNER JOIN games g ON m.game_id = g.id |
| 77 | INNER JOIN chapters c ON m.chapter_id = c.id | 77 | INNER JOIN chapters c ON m.chapter_id = c.id |
| 78 | WHERE m.id = $1` | 78 | WHERE m.id = $1` |
| 79 | err = database.DB.QueryRow(sql, id).Scan(&response.Map.ID, &response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName, &response.Map.Image, &response.Map.IsCoop) | 79 | err = database.DB.QueryRow(sql, id).Scan(&response.Map.ID, &response.Map.GameName, &response.Map.ChapterName, &response.Map.MapName, &response.Map.Image, &response.Map.IsCoop, &response.Map.IsDisabled) |
| 80 | if err != nil { | 80 | if err != nil { |
| 81 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 81 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 82 | return | 82 | return |