@ruiapp/rapid-core 0.8.0 → 0.8.1

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/dist/index.js CHANGED
@@ -965,6 +965,7 @@ async function buildRoutes(server, applicationConfig) {
965
965
  url: request.url.toString(),
966
966
  input,
967
967
  });
968
+ routerContext.response.status = 200;
968
969
  let handlerContext = {
969
970
  logger,
970
971
  routerContext,
@@ -1050,7 +1051,7 @@ class RapidResponse {
1050
1051
  getResponse() {
1051
1052
  if (!this.#response) {
1052
1053
  this.#response = new Response(this.body, {
1053
- status: this.status || (this.body ? 200 : 404),
1054
+ status: this.status || 200,
1054
1055
  headers: this.headers,
1055
1056
  });
1056
1057
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -70,7 +70,7 @@ export class RapidResponse {
70
70
  getResponse() {
71
71
  if (!this.#response) {
72
72
  this.#response = new Response(this.body, {
73
- status: this.status || (this.body ? 200 : 404),
73
+ status: this.status || 200,
74
74
  headers: this.headers,
75
75
  });
76
76
  }
@@ -54,6 +54,8 @@ export async function buildRoutes(server: IRpdServer, applicationConfig: RpdAppl
54
54
  input,
55
55
  });
56
56
 
57
+ routerContext.response.status = 200;
58
+
57
59
  let handlerContext: ActionHandlerContext = {
58
60
  logger,
59
61
  routerContext,