summaryrefslogtreecommitdiff
path: root/backend/src/API
diff options
context:
space:
mode:
authorphyscik <mynameisgennadiy@vk.com>2026-04-28 23:33:59 +0500
committerphyscik <mynameisgennadiy@vk.com>2026-04-28 23:33:59 +0500
commit533c04d9558bd0a575671c157ca42236f59a2c5a (patch)
tree895ec8672f9633fd6cfef85f6a12921fc5339ab3 /backend/src/API
parentec5ef35ed47b90b9f09199d28f7885f8287815a8 (diff)
frontend auth
Diffstat (limited to 'backend/src/API')
-rw-r--r--backend/src/API/AuthenticationAPI.zig8
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(),
+ },
+ } , .{});
}