feat: signup return username

This commit is contained in:
nihonium 2025-11-25 04:13:52 +03:00
parent e64e770783
commit a225d1fb60
Signed by: nihonium
GPG key ID: 0251623741027CFC
3 changed files with 10 additions and 17 deletions

View file

@ -78,7 +78,6 @@ func (s Server) PostAuthSignIn(ctx context.Context, req auth.PostAuthSignInReque
}
err := ""
success := true
pass, ok := UserDb[req.Body.Nickname]
if !ok || pass != req.Body.Pass {
@ -96,9 +95,9 @@ func (s Server) PostAuthSignIn(ctx context.Context, req auth.PostAuthSignInReque
// Return access token; refresh token can be returned in response or HttpOnly cookie
result := auth.PostAuthSignIn200JSONResponse{
Error: &err,
Success: &success,
UserId: &req.Body.Nickname,
Error: &err,
UserId: &req.Body.Nickname,
UserName: &req.Body.Nickname,
}
return result, nil
}