feat: add sync button to execute syncer once (#668)

* feat: add sync button to execute syncer once

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: requested changes

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: requested changes

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
This commit is contained in:
Yixiang Zhao
2022-04-18 16:27:34 +08:00
committed by GitHub
parent a6a055cc83
commit 67a0264411
5 changed files with 45 additions and 3 deletions

View File

@ -54,3 +54,10 @@ export function deleteSyncer(syncer) {
body: JSON.stringify(newSyncer),
}).then(res => res.json());
}
export function runSyncer(owner, name) {
return fetch(`${Setting.ServerUrl}/api/run-syncer?id=${owner}/${encodeURIComponent(name)}`, {
method: 'GET',
credentials: 'include',
}).then(res => res.json());
}