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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
module.exports = Self => { module.exports = Self => {
Self.remoteMethod('threeLastActive', { 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', 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: [{ accepts: [{
arg: 'filter', arg: 'filter',
type: 'object', type: 'object',

View File

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

View File

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

View File

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

View File

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

View File

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