1781-zoneHoliday #994

Merged
joan merged 49 commits from 1781-zoneHoliday into dev 2022-08-03 06:41:31 +00:00
3 changed files with 6 additions and 6 deletions
Showing only changes of commit eb586643ca - Show all commits

View File

@ -1,8 +1,8 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('editExclusionGeo', {
description: 'Edit the geos excluded from a zone',
Self.remoteMethod('updateExclusionGeo', {
description: 'Update the geos excluded from a zone',
accepts: [
{
arg: 'zoneExclusionFk',
@ -21,12 +21,12 @@ module.exports = Self => {
root: true
},
http: {
path: `/editExclusionGeo`,
path: `/updateExclusionGeo`,
verb: 'POST'
}
});
Self.editExclusionGeo = async(zoneExclusionFk, geoIds, options) => {
Self.updateExclusionGeo = async(zoneExclusionFk, geoIds, options) => {
const models = Self.app.models;
const myOptions = {};

View File

@ -9,7 +9,7 @@ module.exports = Self => {
require('../methods/zone/includingExpired')(Self);
require('../methods/zone/getZoneClosing')(Self);
require('../methods/zone/exclusionGeo')(Self);
require('../methods/zone/editExclusionGeo')(Self);
require('../methods/zone/updateExclusionGeo')(Self);
Self.validatesPresenceOf('agencyModeFk', {
message: `Agency cannot be blank`

View File

@ -229,7 +229,7 @@ class Controller extends Section {
zoneExclusionFk: this.excludeSelected.id,
geoIds
};
req = this.$http.post(`Zones/editExclusionGeo`, params);
req = this.$http.post(`Zones/updateExclusionGeo`, params);
}
return req.then(() => this.refresh());
}