mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-13 08:48:26 +00:00
api/src/services/url: support for longer Loom URL variant containing content ID
This commit is contained in:
parent
07947882c4
commit
ab52297613
@ -98,6 +98,15 @@ function aliasURL(url) {
|
||||
if (url.hostname === 'xhslink.com' && parts.length === 3) {
|
||||
url = new URL(`https://www.xiaohongshu.com/a/${parts[2]}`);
|
||||
}
|
||||
break;
|
||||
|
||||
case "loom":
|
||||
const idPart = parts[parts.length - 1];
|
||||
if(idPart.length > 32){
|
||||
const actualIdPart = idPart.slice(-32);
|
||||
url.pathname = `/share/${actualIdPart}`;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return url;
|
||||
|
Loading…
Reference in New Issue
Block a user