From 7c2b1a5669d2f8997c0255d862811f9ca62ccdc1 Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Sun, 21 Jan 2024 13:44:28 +0200 Subject: [PATCH] redirecting to 404 if not found --- src/url-shortener/url-shortener.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/url-shortener/url-shortener.controller.ts b/src/url-shortener/url-shortener.controller.ts index bb8506c..345f486 100644 --- a/src/url-shortener/url-shortener.controller.ts +++ b/src/url-shortener/url-shortener.controller.ts @@ -25,7 +25,7 @@ export class UrlShortenerController { try { const originalUrl = this.urlShortenerService.getOriginalUrl(shortUrl); if (!originalUrl) { - return res.redirect('http://localhost:3000/404'); + return res.redirect('http://localhost:3001/404'); } return res.redirect(originalUrl); } catch (error) {