mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
feat(onboarding): add onboarding wizard flow
- Add `onboardingCompletedAt` field to User model + migration - Add AUDIO/R2_AUDIO enum values to schema - Gate dashboard behind onboarding check; redirect to /onboarding if not completed - Add /onboarding page + layout with 5-step wizard (welcome, workspace, project, video info, notifications) - Add POST /api/onboarding/complete endpoint to mark onboarding done Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
d4f4220520
commit
31fda8a28c
@@ -0,0 +1,17 @@
|
||||
import { auth } from '@/lib/auth';
|
||||
import { db } from '@/lib/db';
|
||||
import { apiErrors, successResponse } from '@/lib/api-response';
|
||||
|
||||
export async function POST() {
|
||||
const session = await auth();
|
||||
if (!session?.user?.id) {
|
||||
return apiErrors.unauthorized();
|
||||
}
|
||||
|
||||
await db.user.update({
|
||||
where: { id: session.user.id },
|
||||
data: { onboardingCompletedAt: new Date() },
|
||||
});
|
||||
|
||||
return successResponse({ completed: true });
|
||||
}
|
||||
Reference in New Issue
Block a user