Remove resolveShortLink function

apply suggestions
This commit is contained in:
Aholicknight 2024-12-27 14:26:03 -06:00 committed by GitHub
parent 41296b7413
commit e775d4c5e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,15 +48,12 @@ async function getAccessToken() {
return access_token;
}
async function resolveShortLink(url) {
return await getRedirectingURL(url);
}
export default async function(obj) {
let url;
if (obj.shortLink) {
const resolvedUrl = await resolveShortLink(obj.shortLink);
const resolvedUrl = await getRedirectingURL(obj.shortLink);
if (!resolvedUrl) return { error: "fetch.short_link" };
url = new URL(resolvedUrl);
} else {