@@ 1,6 1,6 @@
/*
* This file is part of sdbapi
- * Copyright (C) 2022 Jonni Liljamo <jonni@liljamo.com>
+ * Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
*
* Licensed under GPL-3.0-only.
* See LICENSE for licensing information.
@@ 28,11 28,10 @@ func MyGames(c *gin.Context) {
games, err := db.GetGamesForUser(user.ID)
if err != nil {
- c.JSON(http.StatusBadRequest, gin.H{"error": err})
+ c.JSON(http.StatusBadRequest, gin.H{"error": apierror.Placeholder})
c.Abort()
return
}
- c.JSON(http.StatusOK, gin.H{"games": games})
+ c.JSON(http.StatusOK, games)
}
-