Skip to content

Commit 78531f2

Browse files
Refactor: Improve code formatting and remove trailing whitespaces
Co-authored-by: me <[email protected]>
1 parent 1f90910 commit 78531f2

File tree

4 files changed

+7669
-6408
lines changed

4 files changed

+7669
-6408
lines changed

epicshop/epic-me/app/routes/test-auth.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ const requestParamsSchema = z
88
code_challenge: z.string(),
99
code_challenge_method: z.string(),
1010
redirect_uri: z.string(),
11-
scope: z.string().optional().default('').transform(s => s ? s.split(' ') : []),
11+
scope: z
12+
.string()
13+
.optional()
14+
.default('')
15+
.transform((s) => (s ? s.split(' ') : [])),
1216
state: z.string().optional().default(''),
1317
user_id: z.string().optional(), // For programmatic testing
1418
})
@@ -35,7 +39,7 @@ const requestParamsSchema = z
3539

3640
export async function loader({ request, context }: Route.LoaderArgs) {
3741
const url = new URL(request.url)
38-
42+
3943
try {
4044
const requestParams = requestParamsSchema.parse(
4145
Object.fromEntries(url.searchParams),
@@ -74,8 +78,11 @@ export async function loader({ request, context }: Route.LoaderArgs) {
7478
} catch (error) {
7579
console.error('Error in test-auth:', error)
7680
return Response.json(
77-
{ error: 'Failed to complete authorization', details: error instanceof Error ? error.message : String(error) },
81+
{
82+
error: 'Failed to complete authorization',
83+
details: error instanceof Error ? error.message : String(error),
84+
},
7885
{ status: 500 },
7986
)
8087
}
81-
}
88+
}

0 commit comments

Comments
 (0)