fix signup logic
Some checks failed
Build and Push Docker Image / Build image (push) Has been cancelled
Some checks failed
Build and Push Docker Image / Build image (push) Has been cancelled
This commit is contained in:
parent
440896ec69
commit
f1919d0602
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user