fix: 解决部署问题
This commit is contained in:
@@ -103,23 +103,24 @@ app
|
||||
}
|
||||
console.log('path', path);
|
||||
const check = await appPathCheck({ key });
|
||||
let appType: string;
|
||||
if (check) {
|
||||
if (!force) {
|
||||
ctx.throw(400, 'App already exists, please remove it first');
|
||||
} else {
|
||||
const app = manager.getAppShowInfo(key);
|
||||
const appType = app?.type;
|
||||
appType = app?.type;
|
||||
|
||||
await manager.removeApp(key);
|
||||
if (appType === 'system-app') {
|
||||
// 如果是system-app(主进程运行),就重载
|
||||
selfRestart();
|
||||
}
|
||||
}
|
||||
}
|
||||
const installAppData = await installApp({ path, key });
|
||||
await manager.add(installAppData.showAppInfo);
|
||||
ctx.body = installAppData;
|
||||
if (appType === 'system-app') {
|
||||
// 如果是system-app(主进程运行),就重启服务
|
||||
setTimeout(() => selfRestart(), 3000);
|
||||
}
|
||||
})
|
||||
.addTo(app);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ app
|
||||
const token = await user.createToken(null, loginType);
|
||||
ctx.res.cookie('token', token.token, {
|
||||
maxAge: token.expireTime,
|
||||
domain: { domain },
|
||||
domain,
|
||||
sameSite: 'lax',
|
||||
httpOnly: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user