9 lines
327 B
TypeScript
9 lines
327 B
TypeScript
import { authFailure, jsonResponse, requireApiUser } from '@/lib/server/auth';
|
|||
|
|
|
||
|
|
export const runtime = 'nodejs';
|
||
|
|
export const dynamic = 'force-dynamic';
|
||
|
|
|
||
|
|
export async function GET() {
|
||
|
|
try { return jsonResponse({ user: await requireApiUser({ allowPasswordChange: true }) }); }
|
||
|
|
catch (error) { return authFailure(error); }
|
||
|
|
}
|