@centeredgesoft/runtime-mock-routes 2.10.1 → 2.10.2

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.
@@ -192,9 +192,12 @@ const appFactory = (runtimeCollection) => {
192
192
  headers: req.headers
193
193
  };
194
194
  if (method.status) {
195
- const status = typeof method.status === 'function'
195
+ let status = typeof method.status === 'function'
196
196
  ? method.status(tokenParams)
197
197
  : method.status;
198
+ if (typeof status === 'string') {
199
+ status = parseInt(status);
200
+ }
198
201
  res.status(status);
199
202
  }
200
203
  if (method.headers) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centeredgesoft/runtime-mock-routes",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
package/src/appV2.ts CHANGED
@@ -245,9 +245,13 @@ export const appFactory = (runtimeCollection?: RuntimeRequestCollection) => {
245
245
  }
246
246
 
247
247
  if (method.status) {
248
- const status = typeof method.status === 'function'
249
- ? method.status(tokenParams)
250
- : method.status
248
+ let status = typeof method.status === 'function'
249
+ ? method.status(tokenParams)
250
+ : method.status
251
+
252
+ if (typeof status === 'string') {
253
+ status = parseInt(status);
254
+ }
251
255
 
252
256
  res.status(status);
253
257
  }