fixed api

This commit is contained in:
2024-05-21 21:57:36 +03:00
parent 207ea01b4c
commit cbe0d7934b
3 changed files with 24 additions and 4 deletions

View File

@@ -150,8 +150,8 @@ func (con Connection) signUp(c *gin.Context) {
}
type SignInRequest struct {
Username string `json:"username"`
Password string `json:"password"`
Username string
Password string
}
func (con Connection) signIn(c *gin.Context) {
@@ -186,7 +186,7 @@ func (con Connection) signIn(c *gin.Context) {
return
}
c.SetCookie("auth", signedToken, -1, "", "", false, false)
c.SetCookie("auth", signedToken, -1, "", "", false, true)
c.IndentedJSON(http.StatusOK, signedToken)
}