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/share | |
| 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/share')
| -rw-r--r-- | apps/web/app/api/share/[token]/route.ts | 8 | ||||
| -rw-r--r-- | apps/web/app/api/share/route.ts | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/apps/web/app/api/share/[token]/route.ts b/apps/web/app/api/share/[token]/route.ts index 45224aa..d1d57b5 100644 --- a/apps/web/app/api/share/[token]/route.ts +++ b/apps/web/app/api/share/[token]/route.ts @@ -13,7 +13,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 { token } = await params @@ -26,7 +26,7 @@ export async function DELETE( if (error) { return NextResponse.json( - { error: "Failed to delete share" }, + { error: "failed to delete share" }, { status: 500 } ) } @@ -44,7 +44,7 @@ export async function PATCH( } = await supabaseClient.auth.getUser() if (!user) { - return NextResponse.json({ error: "Not authenticated" }, { status: 401 }) + return NextResponse.json({ error: "not authenticated" }, { status: 401 }) } const { token } = await params @@ -76,7 +76,7 @@ export async function PATCH( if (error) { return NextResponse.json( - { error: "Failed to update share" }, + { error: "failed to update share" }, { status: 500 } ) } diff --git a/apps/web/app/api/share/route.ts b/apps/web/app/api/share/route.ts index 2558560..f330bd0 100644 --- a/apps/web/app/api/share/route.ts +++ b/apps/web/app/api/share/route.ts @@ -22,7 +22,7 @@ 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 { data: userProfile } = await supabaseClient @@ -73,7 +73,7 @@ export async function POST(request: Request) { if (!entryAccess) { return NextResponse.json( - { error: "Entry not found or not accessible" }, + { error: "entry not found or not accessible" }, { status: 404 } ) } @@ -87,7 +87,7 @@ export async function POST(request: Request) { if (!subscriptionAccess) { return NextResponse.json( - { error: "You do not have access to this entry" }, + { error: "you do not have access to this entry" }, { status: 403 } ) } @@ -121,7 +121,7 @@ export async function POST(request: Request) { if (error) { return NextResponse.json( - { error: "Failed to create share" }, + { error: "failed to create share" }, { status: 500 } ) } |