zyket 1.1.4 → 1.1.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyket",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -71,6 +71,7 @@ module.exports = class Express extends Service {
71
71
  async (req, res) => {
72
72
  try {
73
73
  const routeResponse = await route[methodName]({ container: this.#container, request: req, response: res });
74
+ if (routeResponse instanceof RedirectResponse) return res.redirect(routeResponse.url);
74
75
 
75
76
  // Check if response is a buffer (file download)
76
77
  if (Buffer.isBuffer(routeResponse)) {
@@ -126,7 +127,6 @@ module.exports = class Express extends Service {
126
127
  async (req, res) => {
127
128
  try {
128
129
  const routeResponse = await route[methodName]({ container: this.#container, request: req, response: res });
129
-
130
130
  if (routeResponse instanceof RedirectResponse) return res.redirect(routeResponse.url);
131
131
 
132
132
  // Check if response is a buffer (file download)