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/v1 | |
| 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/v1')
| -rw-r--r-- | apps/web/app/api/v1/entries/[entryIdentifier]/route.ts | 4 | ||||
| -rw-r--r-- | apps/web/app/api/v1/entries/route.ts | 2 | ||||
| -rw-r--r-- | apps/web/app/api/v1/feeds/route.ts | 2 | ||||
| -rw-r--r-- | apps/web/app/api/v1/folders/route.ts | 2 | ||||
| -rw-r--r-- | apps/web/app/api/v1/keys/[keyIdentifier]/route.ts | 4 | ||||
| -rw-r--r-- | apps/web/app/api/v1/keys/route.ts | 14 | ||||
| -rw-r--r-- | apps/web/app/api/v1/profile/route.ts | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/apps/web/app/api/v1/entries/[entryIdentifier]/route.ts b/apps/web/app/api/v1/entries/[entryIdentifier]/route.ts index 157366b..d420f92 100644 --- a/apps/web/app/api/v1/entries/[entryIdentifier]/route.ts +++ b/apps/web/app/api/v1/entries/[entryIdentifier]/route.ts @@ -28,7 +28,7 @@ export async function GET( .single() if (error || !entry) { - return NextResponse.json({ error: "Entry not found" }, { status: 404 }) + return NextResponse.json({ error: "entry not found" }, { status: 404 }) } const { data: subscription } = await adminClient @@ -39,7 +39,7 @@ export async function GET( .single() if (!subscription) { - return NextResponse.json({ error: "Entry not found" }, { status: 404 }) + return NextResponse.json({ error: "entry not found" }, { status: 404 }) } const { data: stateRow } = await adminClient diff --git a/apps/web/app/api/v1/entries/route.ts b/apps/web/app/api/v1/entries/route.ts index 653c79b..e782e3b 100644 --- a/apps/web/app/api/v1/entries/route.ts +++ b/apps/web/app/api/v1/entries/route.ts @@ -57,7 +57,7 @@ export async function GET(request: Request) { if (error) { return NextResponse.json( - { error: "Failed to load entries" }, + { error: "failed to load entries" }, { status: 500 } ) } diff --git a/apps/web/app/api/v1/feeds/route.ts b/apps/web/app/api/v1/feeds/route.ts index adf5422..5b59856 100644 --- a/apps/web/app/api/v1/feeds/route.ts +++ b/apps/web/app/api/v1/feeds/route.ts @@ -22,7 +22,7 @@ export async function GET(request: Request) { if (error) { return NextResponse.json( - { error: "Failed to load feeds" }, + { error: "failed to load feeds" }, { status: 500 } ) } diff --git a/apps/web/app/api/v1/folders/route.ts b/apps/web/app/api/v1/folders/route.ts index 5fb006d..3b808a6 100644 --- a/apps/web/app/api/v1/folders/route.ts +++ b/apps/web/app/api/v1/folders/route.ts @@ -21,7 +21,7 @@ export async function GET(request: Request) { if (error) { return NextResponse.json( - { error: "Failed to load folders" }, + { error: "failed to load folders" }, { status: 500 } ) } diff --git a/apps/web/app/api/v1/keys/[keyIdentifier]/route.ts b/apps/web/app/api/v1/keys/[keyIdentifier]/route.ts index 8026f27..9835227 100644 --- a/apps/web/app/api/v1/keys/[keyIdentifier]/route.ts +++ b/apps/web/app/api/v1/keys/[keyIdentifier]/route.ts @@ -12,7 +12,7 @@ export async function DELETE( } = await supabaseClient.auth.getUser() if (!user) { - return NextResponse.json({ error: "Not authenticated" }, { status: 401 }) + return NextResponse.json({ error: "not authenticated" }, { status: 401 }) } const { keyIdentifier } = await params @@ -27,7 +27,7 @@ export async function DELETE( if (error) { return NextResponse.json( - { error: "Failed to revoke API key" }, + { error: "failed to revoke api key" }, { status: 500 } ) } diff --git a/apps/web/app/api/v1/keys/route.ts b/apps/web/app/api/v1/keys/route.ts index 7ac7144..1461532 100644 --- a/apps/web/app/api/v1/keys/route.ts +++ b/apps/web/app/api/v1/keys/route.ts @@ -14,7 +14,7 @@ export async function GET() { } = await supabaseClient.auth.getUser() if (!user) { - return NextResponse.json({ error: "Not authenticated" }, { status: 401 }) + return NextResponse.json({ error: "not authenticated" }, { status: 401 }) } const adminClient = createSupabaseAdminClient() @@ -26,7 +26,7 @@ export async function GET() { if (error) { return NextResponse.json( - { error: "Failed to load API keys" }, + { error: "failed to load api keys" }, { status: 500 } ) } @@ -50,12 +50,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(`api-keys:${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 adminClient = createSupabaseAdminClient() @@ -71,7 +71,7 @@ export async function POST(request: Request) { !TIER_LIMITS[userProfile.tier as SubscriptionTier]?.allowsApiAccess ) { return NextResponse.json( - { error: "API access requires the developer plan" }, + { error: "api access requires the developer plan" }, { status: 403 } ) } @@ -84,7 +84,7 @@ export async function POST(request: Request) { if ((activeKeyCount ?? 0) >= MAXIMUM_ACTIVE_KEYS) { return NextResponse.json( - { error: `Maximum of ${MAXIMUM_ACTIVE_KEYS} active keys allowed` }, + { error: `maximum of ${MAXIMUM_ACTIVE_KEYS} active keys allowed` }, { status: 400 } ) } @@ -103,7 +103,7 @@ export async function POST(request: Request) { if (insertError) { return NextResponse.json( - { error: "Failed to create API key" }, + { error: "failed to create api key" }, { status: 500 } ) } diff --git a/apps/web/app/api/v1/profile/route.ts b/apps/web/app/api/v1/profile/route.ts index f7ec308..a7773dd 100644 --- a/apps/web/app/api/v1/profile/route.ts +++ b/apps/web/app/api/v1/profile/route.ts @@ -24,7 +24,7 @@ export async function GET(request: Request) { if (error || !profile) { return NextResponse.json( - { error: "Failed to load profile" }, + { error: "failed to load profile" }, { status: 500 } ) } |