diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 18:46:44 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-17 18:46:44 +1100 |
commit | 1e88d63186ac0044f70199f8c8a45a52f4f1769f (patch) | |
tree | 9029feedd87f055a2dde31c94e6f85b81ea2fbbb /src/api/util/utility/EmbedHandlers.ts | |
parent | Remove bad banned words implementation (diff) | |
download | server-1e88d63186ac0044f70199f8c8a45a52f4f1769f.tar.xz |
Remove `sharp` dep
Diffstat (limited to 'src/api/util/utility/EmbedHandlers.ts')
-rw-r--r-- | src/api/util/utility/EmbedHandlers.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/api/util/utility/EmbedHandlers.ts b/src/api/util/utility/EmbedHandlers.ts index 374d88fd..a8738a4a 100644 --- a/src/api/util/utility/EmbedHandlers.ts +++ b/src/api/util/utility/EmbedHandlers.ts @@ -17,7 +17,7 @@ export const DEFAULT_FETCH_OPTIONS: any = { }; export const getProxyUrl = (url: URL, width: number, height: number): string => { - const { endpointPublic, resizeWidthMax, resizeHeightMax, imagorServerUrl } = Config.get().cdn; + const { resizeWidthMax, resizeHeightMax, imagorServerUrl } = Config.get().cdn; const secret = Config.get().security.jwtSecret; // maybe shouldn't use this? width = Math.min(width || 500, resizeWidthMax || width); height = Math.min(height || 500, resizeHeightMax || width); @@ -34,8 +34,9 @@ export const getProxyUrl = (url: URL, width: number, height: number): string => return `${imagorServerUrl}/${hash}/${path}`; } - // Fosscord CDN resizer - return `${endpointPublic}/external/resize/${encodeURIComponent(url.href)}?width=${width}&height=${height}`; + // TODO: Imagor documentation + console.log("Imagor has not been set up correctly. docs.fosscord.com/set/up/a/page/about/this"); + return ""; }; const getMeta = ($: cheerio.CheerioAPI, name: string): string | undefined => { |