fix(update): hapus referensi info.* di handler POST (info is not defined)
All checks were successful
CI / test (push) Successful in 1m44s
All checks were successful
CI / test (push) Successful in 1m44s
This commit is contained in:
@@ -4663,10 +4663,8 @@ router.post('/update/run', requireAdminSession, restrictToAdmin, (req, res) => {
|
|||||||
if (!inside.ok) throw new Error('Folder ini belum menjadi git repository.');
|
if (!inside.ok) throw new Error('Folder ini belum menjadi git repository.');
|
||||||
|
|
||||||
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
|
||||||
const _base = String(getSetting('update_base_url', 'https://gitea.oxpoe.xyz') || '').trim().replace(/\/+$/, '');
|
const _base = String(getSetting('update_base_url', 'https://gitea.oxpoe.xyz') || '').trim().replace(/\/+$/, '');
|
||||||
info.repo = _repo || 'origin';
|
const fetch = _repo
|
||||||
info.baseUrl = _base;
|
|
||||||
const fetch = _repo
|
|
||||||
? runCmd('git', ['fetch', '--prune', _base + '/' + _repo + '.git', branch], repoRoot, 120000)
|
? runCmd('git', ['fetch', '--prune', _base + '/' + _repo + '.git', branch], repoRoot, 120000)
|
||||||
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
: runCmd('git', ['fetch', '--prune'], repoRoot);
|
||||||
pushCmd('git fetch --prune', fetch);
|
pushCmd('git fetch --prune', fetch);
|
||||||
|
|||||||
Reference in New Issue
Block a user