diff options
Diffstat (limited to 'backend/src/API')
| -rw-r--r-- | backend/src/API/AuthenticationAPI.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backend/src/API/AuthenticationAPI.zig b/backend/src/API/AuthenticationAPI.zig index 80988aa..0c2a1e9 100644 --- a/backend/src/API/AuthenticationAPI.zig +++ b/backend/src/API/AuthenticationAPI.zig @@ -64,5 +64,11 @@ fn login(_: *Handler.RequestData, req: *httpz.Request, res: *httpz.Response) !vo }; const token = try Tokens.GenerateNewSession(res.arena, user); - try res.json(.{ .Token = token } , .{}); + try res.json(.{ + .Token = token, + .User = .{ + .Username = user.Username, + .Role = user.Role.ToString(), + }, + } , .{}); } |
