storage base from api base

This commit is contained in:
2023-11-25 21:03:05 +08:00
parent caaa4a15de
commit 399f29ad37
4 changed files with 14 additions and 12 deletions

View File

@@ -18,7 +18,10 @@ export { format_time, Time, TitleLine };
const pushServerPublicKey =
'BLM6zZy2CWlsfQ9KsALDgrjPXBf8E3cJ7qQ5vZipN_IjOfeDXFjeYb_zRLzwglyiwr9QpVL9Lt1TS_sZKewJYuY';
export const STORAGE_BASE = `${process.env.REACT_APP_STORAGE || '/'}`;
export const STORAGE_BASE = (localStorage['BACKEND'] || '/').replace(
'api.',
'file.',
);
export function get_api_base() {
return `${window.BACKEND}_api/v1`;