make a generated URL to look like a valid URL
This commit is contained in:
parent
7b61a14d2c
commit
b5d60f7e69
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ export class UrlShortenerService {
|
|||
if(!isValid) {
|
||||
throw new Error('URL is invalid');
|
||||
}
|
||||
let shortUrl = shortid.generate();
|
||||
let shortUrl = "tiny." + shortid.generate() + ".com";
|
||||
this.urlMap.set(shortUrl, originalUrl);
|
||||
return shortUrl
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue