mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 12:59:04 +08:00
fix: 不上传没有设置来源的同步配置
This commit is contained in:
parent
1e61088ed8
commit
14d9885db8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.169",
|
"version": "2.14.170",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -449,7 +449,7 @@ async function syncArtifacts() {
|
|||||||
try {
|
try {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
allArtifacts.map(async (artifact) => {
|
allArtifacts.map(async (artifact) => {
|
||||||
if (artifact.sync) {
|
if (artifact.sync && artifact.source) {
|
||||||
$.info(`正在同步云配置:${artifact.name}...`);
|
$.info(`正在同步云配置:${artifact.name}...`);
|
||||||
const output = await produceArtifact({
|
const output = await produceArtifact({
|
||||||
type: artifact.type,
|
type: artifact.type,
|
||||||
@ -516,7 +516,20 @@ async function syncArtifact(req, res) {
|
|||||||
res,
|
res,
|
||||||
new ResourceNotFoundError(
|
new ResourceNotFoundError(
|
||||||
'RESOURCE_NOT_FOUND',
|
'RESOURCE_NOT_FOUND',
|
||||||
`Artifact ${name} does not exist!`,
|
`找不到远程配置 ${name}`,
|
||||||
|
),
|
||||||
|
404,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!artifact.source) {
|
||||||
|
$.error(`远程配置 ${name} 未设置来源`);
|
||||||
|
failed(
|
||||||
|
res,
|
||||||
|
new ResourceNotFoundError(
|
||||||
|
'RESOURCE_HAS_NO_SOURCE',
|
||||||
|
`远程配置 ${name} 未设置来源`,
|
||||||
),
|
),
|
||||||
404,
|
404,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user