summaryrefslogtreecommitdiff
path: root/src/app/services/shoe/index.js
blob: fc8bbe4260d6bb0cd9a7fd0d4aaf8ce1fc1947d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * Shoe API service.
 * @module app/services/shoe/index
 */

import Service from "app/db/service/base";

/**
 * Service API for listing shoes
 */
export default async function ShoeService(bookshelf) {
  const service = await Service({
    bookshelf,
    Model: bookshelf.model("Shoe"),
    authenticate: false,
    paginate: {
      pageSize: 25,
      pageSizeLimit: 100,
    },
    enabled: ["index", "create"],
    hooks: {
      before: {
        index: [],
        show: [],
      },
      after: {
        index: [],
        show: [],
      },
    },
  });

  return service;
}