Skip to content

Commit

Permalink
Merge pull request #85 from stonarini/master
Browse files Browse the repository at this point in the history
docs: fix "Custom behavior" getList example
  • Loading branch information
nicgirault authored Aug 19, 2023
2 parents 231bea0 + 2524896 commit ae62244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import { User } from './models'
const app = new express()
app.use(
crud('/admin/users', {
getList: ({ filter, limit, offset, order, opts: { req, res } }) =>
getList: ({ filter, limit, offset, order }, { req, res }) =>
User.findAndCountAll({ limit, offset, order, where: filter }),
getOne: (id, { req, res }) => User.findByPk(id),
create: (body, { req, res }) => User.create(body),
Expand Down

0 comments on commit ae62244

Please sign in to comment.