From 3594d5df4c04c98566b920299e65072ad40bf91e Mon Sep 17 00:00:00 2001 From: Joan Date: Thu, 30 Aug 2018 07:09:06 +0200 Subject: [PATCH] back-end test fix --- client/item/src/tax/index.js | 2 +- services/loopback/common/methods/item/updateTaxes.js | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/client/item/src/tax/index.js b/client/item/src/tax/index.js index bf3be6510..f4cc6f73e 100644 --- a/client/item/src/tax/index.js +++ b/client/item/src/tax/index.js @@ -33,7 +33,7 @@ export default class Controller { for (let tax of this.taxes) data.push({id: tax.id, taxClassFk: tax.taxClassFk}); - let url = `/item/api/Items/${this.$stateParams.id}/updateTaxes`; + let url = `/item/api/Items/updateTaxes`; this.$http.post(url, data).then( () => this.vnApp.showSuccess(this._.instant('Data saved!')) ); diff --git a/services/loopback/common/methods/item/updateTaxes.js b/services/loopback/common/methods/item/updateTaxes.js index 53c073dbf..cb54ab1a0 100644 --- a/services/loopback/common/methods/item/updateTaxes.js +++ b/services/loopback/common/methods/item/updateTaxes.js @@ -5,12 +5,6 @@ module.exports = Self => { description: 'Updates the item taxes', accessType: 'WRITE', accepts: [{ - arg: 'id', - type: 'number', - required: true, - description: 'The item id', - http: {source: 'path'} - }, { arg: 'taxes', type: ['object'], required: true, @@ -22,7 +16,7 @@ module.exports = Self => { root: true }, http: { - path: `/:id/updateTaxes`, + path: `/updateTaxes`, verb: 'post' } });