10 lines
250 B
TypeScript
10 lines
250 B
TypeScript
|
import type { Ctx } from "blitz";
|
||
|
|
||
|
import db from "db";
|
||
|
|
||
|
export default async function getCurrentUser(_ = null, { session }: Ctx) {
|
||
|
if (!session.orgId) return null;
|
||
|
|
||
|
return db.subscription.findFirst({ where: { organizationId: session.orgId } });
|
||
|
}
|