mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add onboarding and feedback models
This commit is contained in:
19
dashboard/server/api/onboarding/add.post.ts
Normal file
19
dashboard/server/api/onboarding/add.post.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
import { OnboardingModel } from '@schema/OnboardingSchema';
|
||||
|
||||
export default defineEventHandler(async event => {
|
||||
const data = await getRequestData(event);
|
||||
if (!data) return;
|
||||
|
||||
const { job, analytics } = await readBody(event);
|
||||
|
||||
|
||||
const save = await OnboardingModel.create({
|
||||
user_id: data.user.id,
|
||||
job,
|
||||
analytics
|
||||
});
|
||||
|
||||
return { ok: true }
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user