* Stores the url in the database and returns the shortened url * * @param url The original url to be shortened * @returns The shortened url
()
| 7 | * @returns The shortened url |
| 8 | */ |
| 9 | function generateShortUrl(): string { |
| 10 | const key = uuidv4(); |
| 11 | |
| 12 | const shortenedUrl = `${window.location.origin}/short/${key}`; |
| 13 | return shortenedUrl; |
| 14 | } |
| 15 | |
| 16 | export default generateShortUrl; |
nothing calls this directly
no outgoing calls
no test coverage detected