18 lines
345 B
TypeScript
18 lines
345 B
TypeScript
import { DefaultCtx, SessionContext, SimpleRolesIsAuthorized } from "blitz"
|
|
|
|
import { User, Role } from "./db"
|
|
|
|
declare module "blitz" {
|
|
export interface Ctx extends DefaultCtx {
|
|
session: SessionContext
|
|
}
|
|
|
|
export interface Session {
|
|
isAuthorized: SimpleRolesIsAuthorized<Role>
|
|
PublicData: {
|
|
userId: User["id"]
|
|
role: Role
|
|
}
|
|
}
|
|
}
|