Ignore:
Timestamp:
12/26/25 22:21:22 (7 months ago)
Author:
Tome <gjorgievtome@…>
Branches:
main
Children:
dd5067a
Parents:
e7f1bfa
Message:

Config authjs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/telefunc/ctx.ts

    re7f1bfa r898cf68  
    3333    const { c, userId } = requireUser();
    3434
     35
     36    if(!c.session?.user?.isAdmin === false) throw Abort();
     37
    3538    const isAdmin = await drizzleQueries.isAdmin(c.db, userId);
     39    if (!isAdmin) throw Abort();
    3640
    37     if (!isAdmin) throw Abort();
    3841    return { c, userId };
    3942}
Note: See TracChangeset for help on using the changeset viewer.