fix(xo-server#deleteVmBackupNg): pass remote record to getBackupsRemoteAdapter instead of ID (#5624)
Introduced by baa5847949
This commit is contained in:
parent
693c07b927
commit
2e5dfa5845
@ -921,20 +921,20 @@ export default class BackupNg {
|
|||||||
async _listVmBackupsOnRemote(remoteId: string) {
|
async _listVmBackupsOnRemote(remoteId: string) {
|
||||||
const app = this._app
|
const app = this._app
|
||||||
try {
|
try {
|
||||||
const { proxy, url, options } = await app.getRemoteWithCredentials(remoteId)
|
const remote = await app.getRemoteWithCredentials(remoteId)
|
||||||
|
|
||||||
let backupsByVm
|
let backupsByVm
|
||||||
if (proxy !== undefined) {
|
if (remote.proxy !== undefined) {
|
||||||
;({ [remoteId]: backupsByVm } = await app.callProxyMethod(proxy, 'backup.listVmBackups', {
|
;({ [remoteId]: backupsByVm } = await app.callProxyMethod(remote.proxy, 'backup.listVmBackups', {
|
||||||
remotes: {
|
remotes: {
|
||||||
[remoteId]: {
|
[remoteId]: {
|
||||||
url,
|
url: remote.url,
|
||||||
options,
|
options: remote.options,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
backupsByVm = await using(app.getBackupsRemoteAdapter(remoteId), async adapter =>
|
backupsByVm = await using(app.getBackupsRemoteAdapter(remote), async adapter =>
|
||||||
formatVmBackups(await adapter.listAllVmBackups())
|
formatVmBackups(await adapter.listAllVmBackups())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user