init
This commit is contained in:
commit
d761a10bf7
102 changed files with 4761 additions and 0 deletions
16
lib/config/index.ts
Normal file
16
lib/config/index.ts
Normal 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() : ''}`;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue