feat: external API for Java server integration with dedicated key
This commit is contained in:
@@ -69,6 +69,7 @@ router.post('/complete', async (req, res) => {
|
||||
|
||||
const jwtSecret = crypto.randomBytes(32).toString('hex');
|
||||
const apiKey = crypto.randomBytes(24).toString('hex');
|
||||
const externalKey = crypto.randomBytes(24).toString('hex');
|
||||
|
||||
for (const [k, v, l] of [
|
||||
['site_name', site_name || 'MC举报系统', '站点名称'],
|
||||
@@ -86,6 +87,7 @@ router.post('/complete', async (req, res) => {
|
||||
db_user, db_pass: db_pass || '', db_name,
|
||||
jwt_secret: jwtSecret,
|
||||
api_key: apiKey,
|
||||
external_api_key: externalKey,
|
||||
});
|
||||
|
||||
res.json({ ok: true, message: '安装完成,请重新启动服务器' });
|
||||
|
||||
Reference in New Issue
Block a user