redirecting to 404 if not found
This commit is contained in:
parent
ce6aa233c5
commit
7c2b1a5669
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ export class UrlShortenerController {
|
||||||
try {
|
try {
|
||||||
const originalUrl = this.urlShortenerService.getOriginalUrl(shortUrl);
|
const originalUrl = this.urlShortenerService.getOriginalUrl(shortUrl);
|
||||||
if (!originalUrl) {
|
if (!originalUrl) {
|
||||||
return res.redirect('http://localhost:3000/404');
|
return res.redirect('http://localhost:3001/404');
|
||||||
}
|
}
|
||||||
return res.redirect(originalUrl);
|
return res.redirect(originalUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue