From 854dedead3a3ed987997a0132f527db73b65b0ac Mon Sep 17 00:00:00 2001 From: ivar Date: Sat, 11 Nov 2023 22:10:42 +0100 Subject: Div more changes --- code/app/src/utilities/_fetch.ts | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'code/app/src') diff --git a/code/app/src/utilities/_fetch.ts b/code/app/src/utilities/_fetch.ts index 415e1c2..f884653 100644 --- a/code/app/src/utilities/_fetch.ts +++ b/code/app/src/utilities/_fetch.ts @@ -1,28 +1,28 @@ -import {Temporal} from "temporal-polyfill"; -import {redirect} from "@sveltejs/kit"; -import {browser} from "$app/environment"; -import {goto} from "$app/navigation"; -import {SignInPageMessage, signInPageMessageQueryKey} from "$routes/(main)/(public)/sign-in"; -import {AccountService} from "$services/account-service"; +import { Temporal } from "temporal-polyfill"; +import { redirect } from "@sveltejs/kit"; +import { browser } from "$app/environment"; +import { goto } from "$app/navigation"; +import { SignInPageMessage, signInPageMessageQueryKey } from "$routes/(main)/(public)/sign-in"; +import { AccountService } from "$services/account-service"; export async function http_post_async(url: string, body?: object | string, timeout = -1, skip_401_check = false, abort_signal?: AbortSignal): Promise { const init = make_request_init("post", body, abort_signal); - const response = await internal_fetch_async({url, init, timeout}); + const response = await internal_fetch_async({ url, init, timeout }); if (!skip_401_check && await redirect_if_401_async(response)) throw new Error("Server returned 401"); return response; } export async function http_get_async(url: string, timeout = -1, skip_401_check = false, abort_signal?: AbortSignal): Promise { const init = make_request_init("get", undefined, abort_signal); - const response = await internal_fetch_async({url, init, timeout}); + const response = await internal_fetch_async({ url, init, timeout }); if (!skip_401_check && await redirect_if_401_async(response)) throw new Error("Server returned 401"); return response; } export async function http_delete_async(url: string, body?: object | string, timeout = -1, skip_401_check = false, abort_signal?: AbortSignal): Promise { const init = make_request_init("delete", body, abort_signal); - const response = await internal_fetch_async({url, init, timeout}); + const response = await internal_fetch_async({ url, init, timeout }); if (!skip_401_check && await redirect_if_401_async(response)) throw new Error("Server returned 401"); return response; } @@ -42,11 +42,10 @@ async function internal_fetch_async(request: InternalFetchRequest): Promise