fix: return existing shortener if matching record already exists
This commit is contained in:
parent
ee171da676
commit
0490664441
|
@ -87,7 +87,7 @@ const createShortUrl = async ({
|
|||
userId,
|
||||
customizedShortnerSlug
|
||||
);
|
||||
// if (existing) return existing.customized_shortner_slug || existing.short_code;
|
||||
if (existing) return existing.customized_shortner_slug || existing.short_code;
|
||||
|
||||
const shortCode = generateShortCode(
|
||||
longUrl,
|
||||
|
|
Loading…
Reference in a new issue