mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-16 02:37:19 +08:00
chore: 同步远程配置输出更多日志
This commit is contained in:
parent
9bb4739d56
commit
962bcda9dd
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.14.139",
|
||||
"version": "2.14.140",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -386,10 +386,12 @@ async function syncAllArtifacts(_, res) {
|
||||
async function syncArtifact(req, res) {
|
||||
let { name } = req.params;
|
||||
name = decodeURIComponent(name);
|
||||
$.info(`开始同步远程配置 ${name}...`);
|
||||
const allArtifacts = $.read(ARTIFACTS_KEY);
|
||||
const artifact = findByName(allArtifacts, name);
|
||||
|
||||
if (!artifact) {
|
||||
$.error(`找不到远程配置 ${name}`);
|
||||
failed(
|
||||
res,
|
||||
new ResourceNotFoundError(
|
||||
@ -428,6 +430,7 @@ async function syncArtifact(req, res) {
|
||||
$.write(allArtifacts, ARTIFACTS_KEY);
|
||||
success(res, artifact);
|
||||
} catch (err) {
|
||||
$.error(`远程配置 ${artifact.name} 发生错误: ${err}`);
|
||||
failed(
|
||||
res,
|
||||
new InternalServerError(
|
||||
|
Loading…
x
Reference in New Issue
Block a user