13 lines
359 B
TypeScript
13 lines
359 B
TypeScript
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 ?? [],
|
|
});
|
|
}
|
|
|