redirecting to 404 if not found

This commit is contained in:
Kfir Dayan 2024-01-21 13:44:28 +02:00
parent ce6aa233c5
commit 7c2b1a5669

View file

@ -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) {