chore(xo-server/models/Remote): remove save()

This commit is contained in:
Julien Fontanet 2018-08-14 14:55:02 +02:00
parent 809e1a35cd
commit b966e6097f
2 changed files with 4 additions and 6 deletions

View File

@ -22,10 +22,6 @@ export class Remotes extends Collection {
)
}
async save (remote) {
return /* await */ this.update(remote)
}
async get (properties) {
const remotes = await super.get(properties)
forEach(remotes, remote => {

View File

@ -21,7 +21,9 @@ export default class {
'remotes',
() => this._remotes.get(),
remotes =>
Promise.all(mapToArray(remotes, remote => this._remotes.save(remote)))
Promise.all(
mapToArray(remotes, remote => this._remotes.update(remote))
)
)
const remotes = await this.getAllRemotes()
@ -84,7 +86,7 @@ export default class {
const handler = await this.getRemoteHandler(remote.properties, true)
const props = await handler.sync()
this._updateRemote(remote, props)
return (await this._remotes.save(remote)).properties
return (await this._remotes.update(remote)).properties
}
_updateRemote (remote, { name, url, enabled, error }) {