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