fix: fix hot-api for not build in bun app.mjs
This commit is contained in:
@@ -7,7 +7,7 @@ app.route({
|
||||
}).define(async (ctx) => {
|
||||
const { username, password } = ctx.query;
|
||||
const query = assistantConfig.query;
|
||||
const auth = assistantConfig.getConfig().auth;
|
||||
const auth = assistantConfig.getConfig().auth || {};
|
||||
const res = await query.post({
|
||||
path: 'user',
|
||||
key: 'login',
|
||||
@@ -25,7 +25,7 @@ app.route({
|
||||
}
|
||||
if (!auth.username) {
|
||||
// 初始管理员账号
|
||||
auth.username = 'admin';
|
||||
auth.username = loginUser;
|
||||
assistantConfig.setConfig({ auth });
|
||||
}
|
||||
// 保存配置
|
||||
|
||||
Reference in New Issue
Block a user