crud-api-express 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +12 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crud-api-express",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
package/readme.md CHANGED
@@ -137,27 +137,20 @@ mongoose
137
137
 
138
138
  ### `getRouter(): Router`
139
139
  Returns the Express Router instance configured with CRUD routes.
140
+
141
+ ```json
140
142
  [
141
- { method: 'POST', path: '/examples', params: undefined },
142
- {
143
- method: 'GET',
144
- path: '/examples',
145
- params: [ 'filter', 'sort', 'page', 'limit' ]
146
- },
147
- { method: 'GET', path: '/examples/:id', params: [ 'id' ] },
148
- { method: 'PUT', path: '/examples/:id', params: [ 'id' ] },
149
- { method: 'DELETE', path: '/examples', params: [ 'filter' ] },
150
- { method: 'DELETE', path: '/examples/:id', params: [ 'id' ] },
151
- { method: 'GET', path: '/examples/aggregate', params: undefined },
152
- { method: 'GET', path: '/examples/custom-route', params: undefined },
153
- {
154
- method: 'POST',
155
- path: '/examples/custom-action',
156
- params: undefined
157
- }
143
+ { "method": "POST", "path": "/examples", "params": null },
144
+ { "method": "GET", "path": "/examples", "params": ["filter", "sort", "page", "limit"] },
145
+ { "method": "GET", "path": "/examples/:id", "params": ["id"] },
146
+ { "method": "PUT", "path": "/examples/:id", "params": ["id"] },
147
+ { "method": "DELETE", "path": "/examples", "params": ["filter"] },
148
+ { "method": "DELETE", "path": "/examples/:id", "params": ["id"] },
149
+ { "method": "GET", "path": "/examples/aggregate", "params": null },
150
+ { "method": "GET", "path": "/examples/custom-route", "params": null },
151
+ { "method": "POST", "path": "/examples/custom-action", "params": null }
158
152
  ]
159
- ---
160
-
153
+ ```
161
154
  ## ⚙️ Options
162
155
 
163
156