feat: refs #7524 no apply limit #2921

Merged
jorgep merged 8 commits from 7524-hotfix-addNoLimit into master 2024-09-10 14:48:21 +00:00
Member
No description provided.
jorgep added 1 commit 2024-09-04 12:53:25 +00:00
gitea/salix/pipeline/pr-master There was a failure building this commit Details
e3015a6559
feat: refs #7524 no apply limit
jorgep added 1 commit 2024-09-04 12:53:47 +00:00
jorgep added 1 commit 2024-09-04 12:56:03 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
d82f9b2cd6
chore: refs #7524 fix test
jorgep requested review from juan 2024-09-04 13:00:26 +00:00
jorgep added 1 commit 2024-09-04 14:04:33 +00:00
juan requested changes 2024-09-10 10:06:12 +00:00
Dismissed
juan left a comment
Owner

La propiedad noLimit debe definirse en el método al mismo nivel que accepts, de forma que no pueda ser alterada por el cliente. Ejemplo:

Self.remoteMethodCtx('getBalance', {
    description: 'Returns the ',
    accessType: 'READ',
    accepts: [{
        arg: 'filter',
        type: 'Object',
        required: true,
        description: 'Filter defining where and paginated data',
        http: {source: 'query'}
    }],
    returns: {
        type: ['Object'],
        root: true
    },
    http: {
        path: `/getBalance`,
        verb: 'GET'
    },
    noLimit: true
});
La propiedad `noLimit` debe definirse en el método al mismo nivel que `accepts`, de forma que no pueda ser alterada por el cliente. Ejemplo: ``` Self.remoteMethodCtx('getBalance', { description: 'Returns the ', accessType: 'READ', accepts: [{ arg: 'filter', type: 'Object', required: true, description: 'Filter defining where and paginated data', http: {source: 'query'} }], returns: { type: ['Object'], root: true }, http: { path: `/getBalance`, verb: 'GET' }, noLimit: true }); ```
jorgep added 1 commit 2024-09-10 11:10:16 +00:00
jorgep added 2 commits 2024-09-10 11:22:01 +00:00
jorgep requested review from juan 2024-09-10 11:23:00 +00:00
jorgep added the
CR / Tests passed
label 2024-09-10 11:39:49 +00:00
juan requested changes 2024-09-10 14:16:44 +00:00
Dismissed
@ -29,3 +29,3 @@
this.beforeRemote('**', async ctx => {
if (!this.hasFilter(ctx)) return;
if (ctx.method.noLimit || !this.hasFilter(ctx)) return;
Owner

Comprobar ctx.method.noLimit en la función hasFilter para no repetir lógica

Comprobar `ctx.method.noLimit` en la función `hasFilter` para no repetir lógica
juan marked this conversation as resolved
@ -41,3 +41,3 @@
this.afterRemote('**', async ctx => {
if (!this.hasFilter(ctx)) return;
if (ctx.method.noLimit || !this.hasFilter(ctx)) return;
Owner

Comprobar ctx.method.noLimit en la función hasFilter para no repetir lógica

Comprobar `ctx.method.noLimit` en la función `hasFilter` para no repetir lógica
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-09-10 14:37:50 +00:00
gitea/salix/pipeline/pr-master This commit looks good Details
e3b51c81f9
refactor: refs #7524 wrap it up in a fn
jorgep requested review from juan 2024-09-10 14:37:54 +00:00
juan approved these changes 2024-09-10 14:43:10 +00:00
jorgep merged commit b10ad7527a into master 2024-09-10 14:48:21 +00:00
jorgep deleted branch 7524-hotfix-addNoLimit 2024-09-10 14:48:21 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#2921
No description provided.