mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
fix selfhost
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
|
||||
import { OnboardingModel } from '@schema/OnboardingSchema';
|
||||
|
||||
|
||||
const { SELFHOSTED } = useRuntimeConfig();
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
const data = await getRequestData(event);
|
||||
if (!data) return;
|
||||
|
||||
const exist = await OnboardingModel.exists({ user_id: data.user.id });
|
||||
|
||||
if (SELFHOSTED === 'TRUE' || SELFHOSTED === 'true') {
|
||||
return { exists: true }
|
||||
}
|
||||
return { exist: exist != null }
|
||||
});
|
||||
Reference in New Issue
Block a user