From 557423e887a363d0d1be1dfc6db613f83fd7cec0 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 17 Mar 2022 14:27:36 -0500 Subject: add logging in --- src/lib/APITypes.d.ts | 30 +++++++++++++++++++++++++++++- src/lib/LoginButton.svelte | 32 ++++++++++++++++++++++++++++++++ src/lib/api.ts | 2 +- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 src/lib/LoginButton.svelte (limited to 'src/lib') diff --git a/src/lib/APITypes.d.ts b/src/lib/APITypes.d.ts index 3a54cea..b0deee0 100644 --- a/src/lib/APITypes.d.ts +++ b/src/lib/APITypes.d.ts @@ -162,4 +162,32 @@ export interface ElectionData { year: number candidates: Candidate[] } | null -} \ No newline at end of file +} + +interface SessionSchema { + _id?: string + refresh_token: string + discord_user: { + id: string + name: string + } + lastUpdated: Date +} + +export interface AccountCustomization { + backgroundUrl?: string + pack?: string + emoji?: string +} + +export interface AccountSchema { + _id?: string + discordId: string + minecraftUuid?: string + customization?: AccountCustomization +} + +export interface CleanSocialMedia { + discord: string | null + forums: string | null +} diff --git a/src/lib/LoginButton.svelte b/src/lib/LoginButton.svelte new file mode 100644 index 0000000..bba078e --- /dev/null +++ b/src/lib/LoginButton.svelte @@ -0,0 +1,32 @@ + + +
+ {#if loggedIn} + + {:else} + + + + {/if} +
+ + diff --git a/src/lib/api.ts b/src/lib/api.ts index db6bf81..243cf2b 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1 +1 @@ -export const API_URL = 'https://skyblock-api.matdoes.dev/' \ No newline at end of file +export const API_URL = 'https://skyblock-api.matdoes.dev/' -- cgit