DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

1cda49d745c84e44e9952edc74216feaa0fffee5 — Jonni Liljamo 1 year, 8 months ago 4a51f61
feat(api): make /user/token return more details
1 files changed, 7 insertions(+), 1 deletions(-)

M api/handlers/usertoken.go
M api/handlers/usertoken.go => api/handlers/usertoken.go +7 -1
@@ 53,5 53,11 @@ func GenerateToken(c *gin.Context) {
		return
	}

	c.JSON(http.StatusOK, gin.H{"token": token, "id": user.ID})
	c.JSON(http.StatusOK, gin.H{
		"token": token,
		"id": user.ID,
		"created_at": user.CreatedAt,
		"updated_at": user.UpdatedAt,
		"username": user.Username,
	})
}