set the player id cookie when loading the database and update the background image url logic

This commit is contained in:
Lee
2024-09-09 08:47:41 +01:00
parent c8a7aa7d1d
commit 527d18a422
5 changed files with 34 additions and 8 deletions

View File

@ -7,9 +7,5 @@ import { config } from "../../../config";
* @returns the new image url
*/
export function getImageUrl(originalUrl: string) {
// Remove the prepending slash
if (originalUrl.startsWith("/")) {
originalUrl = originalUrl.substring(1);
}
return `${!config.siteUrl.includes("localhost") ? "https://img.fascinated.cc/upload/q_70/" : ""}${originalUrl}`;
}