Fix uploader not working because window.user was removed

This commit is contained in:
2026-07-30 21:33:45 +02:00
parent 609dfc906a
commit 263f959565
3 changed files with 14 additions and 13 deletions

View File

@@ -1,6 +1,8 @@
// Response types
// ==============
import { get_endpoint } from "./NovaAPI"
export type GenericResponse = {
value: string,
message: string,
@@ -320,11 +322,7 @@ export const fs_path_url = (path: string) => {
path = "/" + path
}
if (window["api_endpoint"] !== undefined) {
return window["api_endpoint"] + "/filesystem" + fs_encode_path(path)
} else {
throw Error("fs_path_url: api_endpoint is undefined")
}
return get_endpoint() + "/filesystem" + fs_encode_path(path)
}
export const fs_encode_path = (path: string) => {