Skip to content

Commit 3e79061

Browse files
authored
Update relation db pagination stub
1 parent 4a5e055 commit 3e79061

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/generate/stubs/relational/service.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func All{{TitleName}}(requestFilter map[string]interface{}) ([]models.{{TitleNam
1919

2020
paginationInstance := artifact.NewPaginator({{PluralLowerName}}, requestFilter)
2121

22-
models.{{TitleName}}Model.Where(filter).Scopes(paginationInstance.PaginateScope()).Find(&{{PluralLowerName}})
22+
models.{{TitleName}}Model.Where(filter).Scopes(paginationInstance.PaginateScope(requestFilter["page"].(int), requestFilter["limit"].(int))).Find(&{{PluralLowerName}})
2323

2424
return {{PluralLowerName}}, paginationInstance.Meta, nil
2525

@@ -84,4 +84,4 @@ func DeleteA{{TitleName}}({{SingularLowerName}}Id string) bool {
8484
}
8585

8686
return true
87-
}
87+
}

0 commit comments

Comments
 (0)