diff --git a/modules/item/back/methods/item/getBalance.js b/modules/item/back/methods/item/getBalance.js index 1a4c7999d..c835cd56f 100644 --- a/modules/item/back/methods/item/getBalance.js +++ b/modules/item/back/methods/item/getBalance.js @@ -8,10 +8,6 @@ module.exports = Self => { required: true, description: 'Filter defining where and paginated data', http: {source: 'query'} - }, { - arg: 'noLimit', - type: 'Boolean', - required: false, }], returns: { type: ['Object'], @@ -20,10 +16,11 @@ module.exports = Self => { http: { path: `/getBalance`, verb: 'GET' - } + }, + noLimit: true }); - Self.getBalance = async(ctx, filter, noLimit, options) => { + Self.getBalance = async(ctx, filter, options) => { const myOptions = {userId: ctx.req.accessToken.userId}; if (typeof options == 'object') diff --git a/modules/item/back/methods/item/specs/getBalance.spec.js b/modules/item/back/methods/item/specs/getBalance.spec.js index cef206411..95de3cc50 100644 --- a/modules/item/back/methods/item/specs/getBalance.spec.js +++ b/modules/item/back/methods/item/specs/getBalance.spec.js @@ -23,7 +23,7 @@ describe('item getBalance()', () => { date: null } }; - const results = await models.Item.getBalance(ctx, filter, true, options); + const results = await models.Item.getBalance(ctx, filter, options); const result = results.find(element => element.clientType == 'loses'); @@ -57,8 +57,8 @@ describe('item getBalance()', () => { } }; - const firstItemBalance = await models.Item.getBalance(ctx, firstFilter, true, options); - const secondItemBalance = await models.Item.getBalance(ctx, secondFilter, true, options); + const firstItemBalance = await models.Item.getBalance(ctx, firstFilter, options); + const secondItemBalance = await models.Item.getBalance(ctx, secondFilter, options); expect(firstItemBalance[9].claimFk).toEqual(null); expect(secondItemBalance[7].claimFk).toEqual(1);