some stuff
This commit is contained in:
@@ -25,7 +25,7 @@ func Register(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
c.SetCookie("token", token, 2*60*60, "", "", false, true)
|
||||
c.Status(http.StatusCreated)
|
||||
c.JSON(http.StatusCreated, gin.H{"username": user.Username, "email": user.Email})
|
||||
}
|
||||
|
||||
func Login(c *gin.Context) {
|
||||
@@ -48,7 +48,7 @@ func Login(c *gin.Context) {
|
||||
|
||||
token, _ := auth.GenerateJWT(user.ID, user.Username, user.Email)
|
||||
c.SetCookie("token", token, 2*60*60, "", "", false, true)
|
||||
c.Status(http.StatusOK)
|
||||
c.JSON(http.StatusOK, gin.H{"username": user.Username, "email": user.Email})
|
||||
}
|
||||
|
||||
func Logout(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user