refactor: use shared component for login callback pages
This commit is contained in:
parent
6d32d05d98
commit
1b949a013d
8 changed files with 253 additions and 248 deletions
|
@ -1,5 +1,6 @@
|
|||
import { PUBLIC_BASE_URL } from "$env/static/public";
|
||||
import { apiFetch } from "$lib/api/fetch";
|
||||
import type { UrlsResponse } from "$lib/api/responses";
|
||||
|
||||
export const load = async () => {
|
||||
const resp = await apiFetch<UrlsResponse>("/auth/urls", {
|
||||
|
@ -11,7 +12,3 @@ export const load = async () => {
|
|||
|
||||
return { urls: resp };
|
||||
};
|
||||
|
||||
interface UrlsResponse {
|
||||
discord: string;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { ErrorCode, type APIError } from "$lib/api/entities";
|
||||
import { apiFetchClient } from "$lib/api/fetch";
|
||||
import type { ExportResponse } from "$lib/api/responses";
|
||||
import { error } from "@sveltejs/kit";
|
||||
|
||||
export const load = async () => {
|
||||
|
@ -12,8 +13,3 @@ export const load = async () => {
|
|||
throw error((e as APIError).code, (e as APIError).message);
|
||||
}
|
||||
};
|
||||
|
||||
interface ExportResponse {
|
||||
path: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue