Skip to content

Commit bbc6266

Browse files
committed
pnpm run format
1 parent 26475bb commit bbc6266

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/lib/api/next/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ export async function PostJson<T>(
6767
const data = await res.json();
6868

6969
return transformer(data);
70-
}
70+
}

src/lib/api/next/oauth.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import { GetBackendUrl, GetJson, PostJson } from './base';
22
import type { LoginOkResponse, OAuthFinalizeRequest, OAuthSignupData } from './models';
3-
import {
4-
TransformLoginOkResponse,
5-
TransformOAuthSignupData,
6-
} from './transformers';
3+
import { TransformLoginOkResponse, TransformOAuthSignupData } from './transformers';
74

85
export function GetOAuthAuthorizeUrl(provider: string, flow: 'LoginOrCreate' | 'Link') {
96
const providerEnc = encodeURIComponent(provider);
@@ -13,13 +10,22 @@ export function GetOAuthAuthorizeUrl(provider: string, flow: 'LoginOrCreate' | '
1310

1411
export async function OAuthSignupGetData(provider: string) {
1512
const providerEnc = encodeURIComponent(provider);
16-
return GetJson<OAuthSignupData>(`/1/oauth/${providerEnc}/signup-data`, 200, TransformOAuthSignupData);
13+
return GetJson<OAuthSignupData>(
14+
`/1/oauth/${providerEnc}/signup-data`,
15+
200,
16+
TransformOAuthSignupData
17+
);
1718
}
1819

1920
export async function OAuthSignupFinalize(
2021
provider: string,
2122
payload: OAuthFinalizeRequest
2223
): Promise<LoginOkResponse> {
2324
const providerEnc = encodeURIComponent(provider);
24-
return PostJson(`/1/oauth/${providerEnc}/signup-finalize`, payload, 200, TransformLoginOkResponse);
25+
return PostJson(
26+
`/1/oauth/${providerEnc}/signup-finalize`,
27+
payload,
28+
200,
29+
TransformLoginOkResponse
30+
);
2531
}

src/routes/(anonymous)/login/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484

8585
<a class=" text-sm opacity-75 hover:underline" href="/forgot-password">Forgot your password?</a>
8686
</form>
87-
87+
8888
<form action={GetOAuthAuthorizeUrl('discord', 'LoginOrCreate')} method="POST">
8989
<Button type="submit">Log In With Discord</Button>
9090
</form>

src/routes/(authenticated)/settings/connections/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { page } from '$app/state';
77
import { accountV1Api } from '$lib/api';
88
import type { OAuthConnectionResponse } from '$lib/api/internal/v1/models';
9+
import { GetOAuthAuthorizeUrl } from '$lib/api/next/oauth';
910
import Container from '$lib/components/Container.svelte';
1011
import { Button } from '$lib/components/ui/button';
1112
import * as Card from '$lib/components/ui/card';
@@ -15,7 +16,6 @@
1516
import { onMount } from 'svelte';
1617
import { toast } from 'svelte-sonner';
1718
import DisconnectDialog from './dialog-oauth-disconnect.svelte';
18-
import { GetOAuthAuthorizeUrl } from '$lib/api/next/oauth';
1919
2020
// ---------- state
2121
let loading = $state(false); // overall refresh button state

0 commit comments

Comments
 (0)