shellphone.app/types.ts

18 lines
352 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;
};
}
}