aboutsummaryrefslogtreecommitdiff
path: root/src/routes/api/session/renew.zig
blob: c13e27ec0812827cb36c09a78a8be4d958dc9f0d (plain)
1
2
3
4
5
6
7
8
9
const memora = @import("memora");
const Context = memora.Context;

pub const access = .users;

pub fn get(ctx: *Context) !void {
     const new = try ctx.storage.sessions.renew(ctx.storage, ctx.fingerprint);
     ctx.response.headers.fingerprint = new.fingerprint;
}