feat: refs #7524 no apply limit #2921
|
@ -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')
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue