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.
- package/package.json +1 -1
- package/readme.md +12 -19
package/package.json
CHANGED
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:
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
{ method:
|
|
148
|
-
{ method:
|
|
149
|
-
{ method:
|
|
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
|
|