From 533c04d9558bd0a575671c157ca42236f59a2c5a Mon Sep 17 00:00:00 2001 From: physcik Date: Tue, 28 Apr 2026 23:33:59 +0500 Subject: frontend auth --- backend/src/API/AuthenticationAPI.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'backend/src') 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(), + }, + } , .{}); } -- cgit v1.3