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 {
|
type SignUpRequest struct {
|
||||||
Token string
|
|
||||||
Username string
|
Username string
|
||||||
Password string
|
Password string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (con AuthApi) signUp(ctx *gin.Context) {
|
func (con AuthApi) signUp(ctx *gin.Context) {
|
||||||
var request SignUpRequest
|
var request SignUpRequest
|
||||||
|
rawToken := ctx.Query("token")
|
||||||
|
|
||||||
err := json.NewDecoder(ctx.Request.Body).Decode(&request)
|
err := json.NewDecoder(ctx.Request.Body).Decode(&request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -98,7 +98,7 @@ func (con AuthApi) signUp(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
token, err := con.tokenHandler.GetInviteToken(ctx, request.Token)
|
token, err := con.tokenHandler.GetInviteToken(ctx, rawToken)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.AbortWithError(500, err)
|
ctx.AbortWithError(500, err)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user