definitions corrected for myOptions of endpoints
This commit is contained in:
parent
296c1335b8
commit
1d253fc53d
|
@ -27,7 +27,7 @@ module.exports = Self => {
|
|||
Self.sendCheckingPresence = async(ctx, recipientId, message, options) => {
|
||||
if (!recipientId) return false;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -60,7 +60,7 @@ module.exports = Self => {
|
|||
const args = ctx.args;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
|||
const args = ctx.args;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -16,7 +16,7 @@ module.exports = function(Self) {
|
|||
const models = Self.app.models;
|
||||
const userId = ctx.req.accessToken.userId;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -31,7 +31,7 @@ module.exports = function(Self) {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = function(Self) {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports = Self => {
|
|||
};
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -20,7 +20,7 @@ module.exports = Self => {
|
|||
|
||||
Self.removeFile = async(ctx, id, options) => {
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
let userId = ctx.req.accessToken.userId;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
const resolvedState = 3;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -44,7 +44,7 @@ module.exports = Self => {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
const args = ctx.args;
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
|
||||
Self.updateClaimAction = async(ctx, id, options) => {
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
|||
|
||||
Self.uploadFile = async(ctx, id, options) => {
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -25,7 +25,7 @@ module.exports = function(Self) {
|
|||
Self.canBeInvoiced = async(id, options) => {
|
||||
const models = Self.app.models;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -68,7 +68,7 @@ module.exports = Self => {
|
|||
Self.addBuy = async(ctx, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -21,7 +21,7 @@ module.exports = Self => {
|
|||
Self.deleteBuys = async(ctx, options) => {
|
||||
const models = Self.app.models;
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
|
||||
Self.editLatestBuys = async(field, newValue, lines, options) => {
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -108,7 +108,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.filter = async(ctx, filter, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
|
||||
Self.getBuys = async(id, filter, options) => {
|
||||
const models = Self.app.models;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -21,7 +21,7 @@ module.exports = Self => {
|
|||
|
||||
Self.getEntry = async(id, options) => {
|
||||
const models = Self.app.models;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = Self => {
|
|||
|
||||
Self.importBuysPreview = async(id, buys, options) => {
|
||||
const models = Self.app.models;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -76,7 +76,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.latestBuysFilter = async(ctx, filter, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -95,7 +95,7 @@ module.exports = Self => {
|
|||
const conn = Self.dataSource.connector;
|
||||
const args = ctx.args;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -20,7 +20,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.summary = async(id, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = Self => {
|
|||
Self.book = async(ref, options) => {
|
||||
const models = Self.app.models;
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
|||
throw new UserError(`Action not allowed on the test environment`);
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -87,7 +87,7 @@ module.exports = Self => {
|
|||
|
||||
Self.filter = async(ctx, filter, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
|
||||
Self.getTickets = async(id, filter, options) => {
|
||||
const models = Self.app.models;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -21,7 +21,7 @@ module.exports = Self => {
|
|||
|
||||
Self.summary = async(id, options) => {
|
||||
let summary = {};
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -3,7 +3,7 @@ const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('activeBuyers', {
|
||||
description: 'Returns a list of agencies from a warehouse',
|
||||
description: 'Returns a list of buyers for the given item type',
|
||||
accepts: [{
|
||||
arg: 'filter',
|
||||
type: 'object',
|
||||
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
Self.activeBuyers = async(filter, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
const where = {isActive: true};
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -20,7 +20,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getSuggestedTickets = async(id, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ module.exports = Self => {
|
|||
Self.getTickets = async(filter, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = Self => {
|
|||
ended.setMonth(12);
|
||||
ended.setDate(0);
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -34,8 +34,8 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const args = ctx.args;
|
||||
const currentUserId = ctx.req.accessToken.userId;
|
||||
const myOptions = {};
|
||||
|
||||
let myOptions = {};
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ module.exports = Self => {
|
|||
const currentUserId = ctx.req.accessToken.userId;
|
||||
const models = Self.app.models;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -31,7 +31,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const args = ctx.args;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -41,7 +41,7 @@ module.exports = Self => {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -28,7 +28,7 @@ module.exports = Self => {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -34,7 +34,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const args = ctx.args;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -27,7 +27,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
const myUserId = ctx.req.accessToken.userId;
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -25,7 +25,7 @@ module.exports = Self => {
|
|||
const userId = ctx.req.accessToken.userId;
|
||||
const stmts = [];
|
||||
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
Self.byWarehouse = async(filter, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
const where = {isActive: true};
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getAgenciesWithWarehouse = async(addressFk, landed, warehouseFk, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -23,7 +23,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.landsThatDay = async(addressFk, landed, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
Self.clone = async(id, options) => {
|
||||
const models = Self.app.models;
|
||||
let tx;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getEvents = async(geoFk, agencyModeFk, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getLeaves = async(id, parentId = null, search, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -14,7 +14,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getUpcomingDeliveries = async options => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.includingExpired = async(ctx, filter, options) => {
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
|
||||
Self.toggleIsIncluded = async(id, geoId, isIncluded, options) => {
|
||||
const models = Self.app.models;
|
||||
let myOptions = {};
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
|
Loading…
Reference in New Issue