refreshToken 从上下文获取getApplication 置上true

This commit is contained in:
wkj 2025-02-07 18:36:56 +08:00
parent 2fe9030905
commit 8ca59369ec
3 changed files with 3 additions and 3 deletions

View File

@ -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];

View File

@ -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];

View File

@ -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];