diff options
| author | Fuwn <[email protected]> | 2026-02-07 02:00:59 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-07 02:00:59 -0800 |
| commit | f93bad7da47093a12116ff0f390abb548289b600 (patch) | |
| tree | e2a9debcca3473af8f293c3215704549e5bde17f /apps/web/app/api/billing/create-checkout-session | |
| parent | style: format Go worker with iku (diff) | |
| download | asa.news-f93bad7da47093a12116ff0f390abb548289b600.tar.xz asa.news-f93bad7da47093a12116ff0f390abb548289b600.zip | |
style: lowercase all user-facing strings and add custom eslint rule
Comprehensive sweep of all user-facing text to enforce lowercase
convention, including acronyms (api, rest, http, opml, json, totp,
mfa, qr, hmac). Added asa-lowercase/lowercase-strings eslint rule
that reports uppercase in notify() calls, error messages, jsx text,
and checked attributes (placeholder, alt, title).
Diffstat (limited to 'apps/web/app/api/billing/create-checkout-session')
| -rw-r--r-- | apps/web/app/api/billing/create-checkout-session/route.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/web/app/api/billing/create-checkout-session/route.ts b/apps/web/app/api/billing/create-checkout-session/route.ts index cfbb388..d165cbc 100644 --- a/apps/web/app/api/billing/create-checkout-session/route.ts +++ b/apps/web/app/api/billing/create-checkout-session/route.ts @@ -12,12 +12,12 @@ export async function POST(request: Request) { } = await supabaseClient.auth.getUser() if (!user) { - return NextResponse.json({ error: "Not authenticated" }, { status: 401 }) + return NextResponse.json({ error: "not authenticated" }, { status: 401 }) } const rateLimitResult = rateLimit(`checkout:${user.id}`, 10, 60_000) if (!rateLimitResult.success) { - return NextResponse.json({ error: "Too many requests" }, { status: 429 }) + return NextResponse.json({ error: "too many requests" }, { status: 429 }) } const body = await request.json().catch(() => ({})) @@ -38,7 +38,7 @@ export async function POST(request: Request) { if (!stripePriceIdentifier) { return NextResponse.json( - { error: "Invalid plan configuration" }, + { error: "invalid plan configuration" }, { status: 500 } ) } @@ -51,7 +51,7 @@ export async function POST(request: Request) { if (profileError || !profile) { return NextResponse.json( - { error: "Failed to load profile" }, + { error: "failed to load profile" }, { status: 500 } ) } @@ -62,7 +62,7 @@ export async function POST(request: Request) { if (currentRank >= targetRank) { return NextResponse.json( - { error: `Already on ${profile.tier} plan` }, + { error: `already on ${profile.tier} plan` }, { status: 400 } ) } @@ -76,7 +76,7 @@ export async function POST(request: Request) { if (!existingItemIdentifier) { return NextResponse.json( - { error: "Could not find existing subscription item" }, + { error: "could not find existing subscription item" }, { status: 500 } ) } @@ -123,7 +123,7 @@ export async function POST(request: Request) { if (updateError) { console.error("Admin client update error:", updateError) return NextResponse.json( - { error: "Failed to save customer: " + updateError.message }, + { error: "failed to save customer: " + updateError.message }, { status: 500 } ) } |