mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: refactor services folder
This commit is contained in:
parent
b16daaa780
commit
9ccf99a86f
35 changed files with 41 additions and 41 deletions
|
|
@ -1,18 +0,0 @@
|
|||
const LEARNHOUSE_API_URL = "http://localhost:1338/api/";
|
||||
const LEARNHOUSE_BACKEND_URL = "http://localhost:1338/";
|
||||
|
||||
export const getAPIUrl = () => LEARNHOUSE_API_URL;
|
||||
|
||||
export const getBackendUrl = () => LEARNHOUSE_BACKEND_URL;
|
||||
|
||||
export const getUriWithOrg = (orgslug: string, path: string) => {
|
||||
return `http://${orgslug}.localhost:3000${path}`;
|
||||
};
|
||||
|
||||
export const getOrgFromUri = () => {
|
||||
const hostname = window.location.hostname;
|
||||
// get the orgslug from the hostname
|
||||
const orgslug = hostname.split(".")[0];
|
||||
return orgslug;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue