accessType refactor #1460
gitea/salix/master This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-05-22 12:35:24 +02:00
parent 216e87b5c9
commit cc72432a37
21 changed files with 11 additions and 23 deletions

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('getAgenciesWithWarehouse', {
description: 'Returns a list of agencies that can land a shipment on a day for an address and a warehouse',
accessType: '',
accepts: [{
arg: 'filter',
type: 'object',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('getFirstShipped', {
description: 'Returns the first shipped and landed possible for params',
accessType: '',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('landsThatDay', {
description: 'Returns a list of agencies that can land a shipment on a day for an address',
accessType: '',
accepts: [{
arg: 'filter',
type: 'object',

View File

@ -1,7 +1,7 @@
module.exports = Self => {
Self.remoteMethod('removeByDate', {
description: 'Removes one or more delivery dates for a zone',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'zoneFk',
type: 'Number',

View File

@ -4,7 +4,6 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
module.exports = Self => {
Self.remoteMethod('getLeaves', {
description: 'Returns the first shipped and landed possible for params',
accessType: '',
accepts: [{
arg: 'zoneFk',
type: 'Number',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('toggleIsIncluded', {
description: 'Toggle include to delivery',
accessType: '',
accepts: [{
arg: 'zoneFk',
type: 'Number',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethodCtx('createFromSales', {
description: 'Create a claim',
accessType: '',
accepts: [{
arg: 'claim',
type: 'object',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('getVisibleAvailable', {
description: 'Returns visible and available for params',
accessType: '',
accepts: [
{
arg: 'id',

View File

@ -3,7 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('removes', {
description: 'Delete an Order Row',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('removes', {
description: 'Change the state of a ticket',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -4,7 +4,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('reserve', {
description: 'Change the state of a ticket',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('updateDiscount', {
description: 'Changes the discount of a sale',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('updatePrice', {
description: 'Changes the discount of a sale',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'params',
type: 'object',

View File

@ -3,7 +3,7 @@ let UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethod('updateQuantity', {
description: 'Changes the quantity of a sale',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'id',
type: 'number',

View File

@ -3,7 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('deleted', {
description: 'Sets the isDeleted value of a ticket to 1',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'ticketFk',
type: 'Object',

View File

@ -1,7 +1,7 @@
module.exports = Self => {
Self.remoteMethod('threeLastActive', {
description: 'Returns the last three tickets of a client that have the alertLevel at 0 and the shiped day is gt today',
accessType: '',
accessType: 'READ',
accepts: [{
arg: 'filter',
type: 'object',

View File

@ -4,7 +4,6 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
module.exports = Self => {
Self.remoteMethod('getLeaves', {
description: 'Returns the first shipped and landed possible for params',
accessType: '',
accepts: [{
arg: 'parentFk',
type: 'Number',

View File

@ -4,7 +4,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
module.exports = Self => {
Self.remoteMethod('nodeAdd', {
description: 'Returns the first shipped and landed possible for params',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'parentFk',
type: 'Number',

View File

@ -4,7 +4,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
module.exports = Self => {
Self.remoteMethod('nodeDelete', {
description: 'Returns the first shipped and landed possible for params',
accessType: '',
accessType: 'WRITE',
accepts: [{
arg: 'parentFk',
type: 'Number',

View File

@ -1,7 +1,6 @@
module.exports = Self => {
Self.remoteMethod('getByWarehouse', {
description: 'Returns an array of labour holidays from an specified warehouse',
accessType: '',
accepts: [{
arg: 'warehouseFk',
type: 'Number',

View File

@ -1,11 +1,8 @@
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('absences', {
description: 'Returns an array of absences from an specified worker',
accessType: '',
accepts: [{
arg: 'workerFk',
type: 'Number',