refactor: eslint and prettier conflict will be resolved and formatted

This commit is contained in:
Enes Köksal
2026-04-23 17:05:43 +03:00
parent 385b61f29b
commit 3cfea40fbd
219 changed files with 16638 additions and 13663 deletions
+17 -17
View File
@@ -4,24 +4,24 @@ import { apiErrors, successResponse } from '@/lib/api-response';
import { checkRateLimit, rateLimitHeaders, RATE_LIMIT_CONFIGS } from '@/lib/rate-limit';
export async function POST() {
const session = await auth();
if (!session?.user?.id) {
return apiErrors.unauthorized();
}
const session = await auth();
if (!session?.user?.id) {
return apiErrors.unauthorized();
}
const cfg = RATE_LIMIT_CONFIGS['onboarding-complete'];
const rl = await checkRateLimit(session.user.id, 'onboarding-complete', cfg);
if (!rl.allowed) {
return new Response(
JSON.stringify({ error: 'Too many requests. Please try again later.' }),
{ status: 429, headers: { 'Content-Type': 'application/json', ...rateLimitHeaders(rl, cfg.maxRequests) } }
);
}
await db.user.update({
where: { id: session.user.id },
data: { onboardingCompletedAt: new Date() },
const cfg = RATE_LIMIT_CONFIGS['onboarding-complete'];
const rl = await checkRateLimit(session.user.id, 'onboarding-complete', cfg);
if (!rl.allowed) {
return new Response(JSON.stringify({ error: 'Too many requests. Please try again later.' }), {
status: 429,
headers: { 'Content-Type': 'application/json', ...rateLimitHeaders(rl, cfg.maxRequests) },
});
}
return successResponse({ completed: true });
await db.user.update({
where: { id: session.user.id },
data: { onboardingCompletedAt: new Date() },
});
return successResponse({ completed: true });
}