diff options
Diffstat (limited to 'backend/handlers/map.go')
| -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 e1e6897..9cb0bcc 100644 --- a/backend/handlers/map.go +++ b/backend/handlers/map.go | |||
| @@ -77,12 +77,12 @@ func FetchMapSummary(c *gin.Context) { | |||
| 77 | } | 77 | } |
| 78 | // Get map data | 78 | // Get map data |
| 79 | response.Map.ID = intID | 79 | response.Map.ID = intID |
| 80 | sql := `SELECT m.id, g.name, c.name, m.name, m.image, g.is_coop, m.is_disabled | 80 | sql := `SELECT m.id, g.name, c.name, m.name, m.image, g.is_coop, m.is_disabled, m.difficulty |
| 81 | FROM maps m | 81 | FROM maps m |
| 82 | INNER JOIN games g ON m.game_id = g.id | 82 | INNER JOIN games g ON m.game_id = g.id |
| 83 | INNER JOIN chapters c ON m.chapter_id = c.id | 83 | INNER JOIN chapters c ON m.chapter_id = c.id |
| 84 | WHERE m.id = $1` | 84 | WHERE m.id = $1` |
| 85 | 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) | 85 | 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, &response.Map.Difficulty) |
| 86 | if err != nil { | 86 | if err != nil { |
| 87 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) | 87 | c.JSON(http.StatusOK, models.ErrorResponse(err.Error())) |
| 88 | return | 88 | return |