feat: add full-stack API persistence and RBAC
This commit is contained in:
12
app/api/auth/session/route.ts
Normal file
12
app/api/auth/session/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { getCurrentAuthContext } from "@/modules/core/server/auth";
|
||||
import { jsonSuccess } from "@/modules/core/server/api";
|
||||
|
||||
export async function GET(): Promise<Response> {
|
||||
const context = await getCurrentAuthContext();
|
||||
|
||||
return jsonSuccess("Session loaded", {
|
||||
account: context?.account ?? null,
|
||||
permissions: context?.permissions ?? [],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user