16 lines
539 B
TypeScript
16 lines
539 B
TypeScript
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() : ''}`;
|
|
};
|