Fix uploader not working because window.user was removed
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user