mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-11 16:28:37 +01:00
new selfhosted version
This commit is contained in:
12
dashboard/server/api/user/onboarding/exists.ts
Normal file
12
dashboard/server/api/user/onboarding/exists.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
import { OnboardingModel } from '@schema/OnboardingSchema';
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
|
||||
const ctx = await getRequestContext(event, 'flag:allowAnonRegistered');
|
||||
|
||||
const exists = await OnboardingModel.exists({ user_id: ctx.user_id });
|
||||
|
||||
return { exists: exists != null }
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user