fix signup logic
Some checks failed
Build and Push Docker Image / Build image (push) Has been cancelled

This commit is contained in:
ACoolName 2025-04-09 03:59:32 +03:00
parent 440896ec69
commit f1919d0602

View File

@ -84,13 +84,13 @@ func (con *AuthApi) LoggedIn(ctx *gin.Context) {
}
type SignUpRequest struct {
Token string
Username string
Password string
}
func (con AuthApi) signUp(ctx *gin.Context) {
var request SignUpRequest
rawToken := ctx.Query("token")
err := json.NewDecoder(ctx.Request.Body).Decode(&request)
if err != nil {
@ -98,7 +98,7 @@ func (con AuthApi) signUp(ctx *gin.Context) {
return
}
token, err := con.tokenHandler.GetInviteToken(ctx, request.Token)
token, err := con.tokenHandler.GetInviteToken(ctx, rawToken)
if err != nil {
ctx.AbortWithError(500, err)
return