Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4263647288 | |||
f1919d0602 |
@@ -84,13 +84,13 @@ func (con *AuthApi) LoggedIn(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
type SignUpRequest struct {
|
||||
Token string
|
||||
Username string
|
||||
Password string
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user