mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-05-04 14:08:04 +08:00
Sub-Store 1.2 支持生成远程配置
现在允许用户生成配置并上传到Gist。
This commit is contained in:
@@ -581,14 +581,18 @@ function service() {
|
||||
|
||||
async function deleteArtifact(req, res) {
|
||||
const name = req.params.name;
|
||||
$.info(`正在删除Artifact:${name}`);
|
||||
try {
|
||||
const allArtifacts = $.read(ARTIFACTS_KEY);
|
||||
if (!allArtifacts[name]) throw new Error(`远程配置:${name}不存在!`);
|
||||
// delete gist
|
||||
await syncArtifact({
|
||||
filename: name,
|
||||
content: ""
|
||||
});
|
||||
const artifact = allArtifacts[name];
|
||||
if (!artifact) throw new Error(`远程配置:${name}不存在!`);
|
||||
if (artifact.updated) {
|
||||
// delete gist
|
||||
await syncArtifact({
|
||||
filename: name,
|
||||
content: ""
|
||||
});
|
||||
}
|
||||
// delete local cache
|
||||
delete allArtifacts[name];
|
||||
$.write(allArtifacts, ARTIFACTS_KEY);
|
||||
|
||||
4
backend/sub-store.min.js
vendored
4
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user