feat: 手动下载备份文件和使用备份上传恢复(前端版本 > 2.14.15)

This commit is contained in:
xream
2023-12-04 16:07:10 +08:00
parent c2499f6779
commit 000e90d114
3 changed files with 25 additions and 6 deletions

View File

@@ -10,7 +10,12 @@ export default function register($app) {
}
async function getSettings(req, res) {
const settings = $.read(SETTINGS_KEY);
let settings = $.read(SETTINGS_KEY);
if (!settings) {
settings = {};
$.write(settings, SETTINGS_KEY);
}
if (!settings.avatarUrl) await updateGitHubAvatar();
if (!settings.artifactStore) await updateArtifactStore();
success(res, settings);