This commit is contained in:
skidoodle 2024-03-13 00:30:45 +01:00
commit d761a10bf7
102 changed files with 4761 additions and 0 deletions

16
lib/config/index.ts Normal file
View file

@ -0,0 +1,16 @@
import { env } from '$env/dynamic/public';
const config = {
cdnEndpoint: env.PUBLIC_CDN_ENDPOINT ?? 'https://cdn.example.org',
sentryDsn: env.PUBLIC_SENTRY_DSN ?? '',
};
export default config;
export const getUserAvatar = (uniqueId: string, time?: number) => {
return `${config.cdnEndpoint}/users/${uniqueId}/avatar.webp${time ? '?t=' + time.toString() : ''}`;
};
export const getBioBanner = (bioId: number, time?: number) => {
return `${config.cdnEndpoint}/bios/${bioId}/banner.webp${time ? '?t=' + time.toString() : ''}`;
};