@@ -24,8 +24,12 @@ const settingService = {
|
||||
const setting = await c.env.kv.get(KvConst.SETTING, { type: 'json' });
|
||||
let domainList = c.env.domain;
|
||||
if (typeof domainList === 'string') {
|
||||
try {
|
||||
domainList = JSON.parse(domainList)
|
||||
} catch (error) {
|
||||
throw new BizError(t('notJsonDomain'));
|
||||
}
|
||||
}
|
||||
domainList = domainList.map(item => '@' + item);
|
||||
setting.domainList = domainList;
|
||||
return setting;
|
||||
|
||||
Reference in New Issue
Block a user