From 44445734ba4a0f05564f808c2fd34a7f23c6fafb Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 20 May 2026 10:16:50 +0200 Subject: Let's do a rewrite! Created project structure and changed `build.zig` and added licence. --- src/routes/api/session/current.zig | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/routes/api/session/current.zig (limited to 'src/routes/api/session/current.zig') diff --git a/src/routes/api/session/current.zig b/src/routes/api/session/current.zig deleted file mode 100644 index 897d01c..0000000 --- a/src/routes/api/session/current.zig +++ /dev/null @@ -1,27 +0,0 @@ -const std = @import("std"); - -const memora = @import("memora"); -const Context = memora.Context; - -pub const access = .users; - -const Result = struct { - name: []const u8, - full_name: []const u8, - birthday: []const u8, - is_admin: bool, -}; - -pub fn get(ctx: *Context) !Result { - const session = ctx.storage.sessions.get( - ctx.storage, - ctx.fingerprint, - ) orelse return error.UserDoesNotExist; - - return .{ - .name = session.info.name, - .full_name = session.info.full_name, - .birthday = session.info.birthday, - .is_admin = session.info.is_admin, - }; -} -- cgit v1.2.3-70-g09d2