From 0005595703b2f3f7083ce4ba19bf5770057c75bd Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Tue, 25 Oct 2022 17:51:37 +0800 Subject: . --- code/app/src/lib/api/root.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'code/app/src/lib/api/root.ts') diff --git a/code/app/src/lib/api/root.ts b/code/app/src/lib/api/root.ts index 3e5bda2..661f24b 100644 --- a/code/app/src/lib/api/root.ts +++ b/code/app/src/lib/api/root.ts @@ -1,6 +1,12 @@ -import {http_post} from "$lib/api/internal-fetch"; -import {api_base} from "$lib/configuration"; +import { http_get_async, http_post_async } from "$lib/api/_fetch"; +import { api_base } from "$lib/configuration"; +import type { IInternalFetchResponse } from "$lib/models/internal/IInternalFetchResponse"; +import type { Result } from "rustic"; export function server_log(message: string): void { - http_post(api_base("_/api/log"), message); + http_post_async(api_base("_/api/log"), message); } + +export function server_version(): Promise, string>> { + return http_get_async(api_base("/version.txt")); +} \ No newline at end of file -- cgit v1.3