shellphone.app/types.ts

18 lines
345 B
TypeScript
Raw Normal View History

2021-07-31 14:33:18 +00:00
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
}
}
}