fix some for iam
This commit is contained in:
@@ -15,5 +15,12 @@ export function isBranch(): boolean {
|
||||
|
||||
// Legacy stored the token under a different localStorage key per mode.
|
||||
// See henza_admin/src/axios.js:6 and router.js:173-174,188.
|
||||
/** آدرس همین پنل، با پیشوند /branch در حالت شعبه. */
|
||||
export function iamAppUrl(path: string) {
|
||||
const base = import.meta.env.BASE_URL || '/';
|
||||
const prefix = base.endsWith('/') ? base : `${base}/`;
|
||||
return `${window.location.origin}${prefix}${path.replace(/^\//, '')}`;
|
||||
}
|
||||
|
||||
export const tokenName = isBranch() ? 'branch_token' : 'token';
|
||||
export const userName = isBranch() ? 'branch_user' : 'user';
|
||||
|
||||
Reference in New Issue
Block a user