The function argument is good enough

This commit is contained in:
Cadence Ember 2023-10-06 17:00:21 +13:00
parent a925750254
commit 9fbef15ad1
1 changed files with 1 additions and 3 deletions

View File

@ -21,13 +21,11 @@ function _removeExpiryParams(url) {
} }
/** /**
* @param {string} path * @param {string} path or full URL if it's not a Discord CDN file
*/ */
async function uploadDiscordFileToMxc(path) { async function uploadDiscordFileToMxc(path) {
let url let url
if (path.startsWith("http")) { if (path.startsWith("http")) {
// TODO: this is cheating to make seed.js easier. due a refactor or a name change since it's not soley for discord?
// possibly could be good to save non-discord external URLs under a user-specified key rather than simply using the url?
url = path url = path
} else { } else {
url = DISCORD_IMAGES_BASE + path url = DISCORD_IMAGES_BASE + path