mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-04 12:33:15 +08:00
fix (product): cron-sync-artifacts not working
This commit is contained in:
@@ -5,9 +5,14 @@ import $ from '@/core/app';
|
||||
|
||||
!(async function () {
|
||||
const settings = $.read(SETTINGS_KEY);
|
||||
if (settings.enableCronSyncArtifacts === true) {
|
||||
await doSync();
|
||||
}
|
||||
// if GitHub token is not configured
|
||||
if (!settings.githubUser || !settings.gistToken) return;
|
||||
|
||||
const artifacts = $.read(ARTIFACTS_KEY);
|
||||
if (!artifacts || artifacts.length === 0) return;
|
||||
|
||||
const shouldSync = artifacts.some((artifact) => artifact.sync);
|
||||
if (shouldSync) doSync();
|
||||
})().finally(() => $.done());
|
||||
|
||||
async function doSync() {
|
||||
|
||||
Reference in New Issue
Block a user