DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

3c26abdb01be0374ebcff0f8e60223cb695f82fa — Jonni Liljamo 1 year, 8 months ago 4821626
feat(sdbclient): update my_games to new standards
1 files changed, 3 insertions(+), 4 deletions(-)

M sdbapi/handlers/mygames.go
M sdbapi/handlers/mygames.go => sdbapi/handlers/mygames.go +3 -4
@@ 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)
}