refreshToken 从上下文获取getApplication 置上true
This commit is contained in:
parent
2fe9030905
commit
8ca59369ec
|
|
@ -2389,7 +2389,7 @@ export async function refreshToken(params, context) {
|
||||||
staging: 600 * 1000, // 十分钟
|
staging: 600 * 1000, // 十分钟
|
||||||
production: 600 * 1000, // 十分钟
|
production: 600 * 1000, // 十分钟
|
||||||
};
|
};
|
||||||
const application = context.getApplication();
|
const application = context.getApplication(true);
|
||||||
const system = application?.system;
|
const system = application?.system;
|
||||||
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
||||||
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
||||||
|
|
|
||||||
|
|
@ -2411,7 +2411,7 @@ async function refreshToken(params, context) {
|
||||||
staging: 600 * 1000, // 十分钟
|
staging: 600 * 1000, // 十分钟
|
||||||
production: 600 * 1000, // 十分钟
|
production: 600 * 1000, // 十分钟
|
||||||
};
|
};
|
||||||
const application = context.getApplication();
|
const application = context.getApplication(true);
|
||||||
const system = application?.system;
|
const system = application?.system;
|
||||||
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
||||||
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
||||||
|
|
|
||||||
|
|
@ -3153,7 +3153,7 @@ export async function refreshToken<ED extends EntityDict>(
|
||||||
staging: 600 * 1000, // 十分钟
|
staging: 600 * 1000, // 十分钟
|
||||||
production: 600 * 1000, // 十分钟
|
production: 600 * 1000, // 十分钟
|
||||||
};
|
};
|
||||||
const application = context.getApplication();
|
const application = context.getApplication(true);
|
||||||
const system = application?.system;
|
const system = application?.system;
|
||||||
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
const tokenRefreshTime = system?.config?.App?.tokenRefreshTime; // 系统设置刷新间隔 毫秒
|
||||||
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
const interval = tokenRefreshTime || intervals[process.env.NODE_ENV];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue