From f7ea8e6435f6724219604f8a37f730bd8eff8a27 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 8 Feb 2018 13:13:42 +0100 Subject: [PATCH] watcher lint --- client/core/src/watcher/watcher.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/core/src/watcher/watcher.js b/client/core/src/watcher/watcher.js index cdcd2974a..18ce80117 100644 --- a/client/core/src/watcher/watcher.js +++ b/client/core/src/watcher/watcher.js @@ -47,7 +47,7 @@ export default class Watcher extends Component { fetchData() { let id = this.data[this.idField]; - // return new Promise((resolve, reject) => { + // return new Promise((resolve, reject) => { this.$http.get(`${this.url}/${id}`).then( json => { this.data = copyObject(json.data); @@ -55,26 +55,33 @@ export default class Watcher extends Component { } // json => reject(json) ); - // }); + // }); } + /** * Submits the data and goes back in the history. + * + * @return {Promise} The request promise */ submitBack() { return this.submit().then( () => this.window.history.back() ); } + /** * Submits the data and goes another state. * * @param {String} state The state name + * @param {Object} params The request params + * @return {Promise} The request promise */ submitGo(state, params) { return this.submit().then( () => this.$state.go(state, params || {}) ); } + /** * Submits the data to the server. *