Login with Discord
diff --git a/src/ts/authorization.ts b/src/ts/authorization.ts
index e50562e..14327f8 100644
--- a/src/ts/authorization.ts
+++ b/src/ts/authorization.ts
@@ -1,11 +1,10 @@
export function isLoggedIn(): Promise
{
- return fetch('http://localhost:31337/authorized', {
+ return fetch('http://localhost:31337/get/user/authorized', {
credentials: 'include',
})
.then((res) => {
return res.json().then((res_json) => {
const is_authorized = res_json.message
- console.log('whwhwhw' + is_authorized)
return Boolean(is_authorized)
})
})
diff --git a/src/ts/user_info.ts b/src/ts/user_info.ts
index 387490b..4678de0 100644
--- a/src/ts/user_info.ts
+++ b/src/ts/user_info.ts
@@ -9,19 +9,17 @@ export const user_store = reactive({
})
export function update_info() {
- fetch('http://localhost:31337/dashboard', {
+ fetch('http://localhost:31337/get/user/info', {
credentials: 'include',
})
.then((res) => {
res
.json()
.then((userjson) => {
- console.log(userjson)
user_store.avatar_decoration =
'https://cdn.discordapp.com/avatar-decoration-presets/' +
userjson.avatar_decoration_data.asset +
'.png'
- console.log(user_store)
user_store.avatar =
'https://cdn.discordapp.com/avatars/' + userjson.id + '/' + userjson.avatar + '.png'
user_store.id = 'https://discord.com/users/' + userjson.id
diff --git a/src/views/UserDashboard.vue b/src/views/UserDashboard.vue
index a6fc8dc..20d370c 100644
--- a/src/views/UserDashboard.vue
+++ b/src/views/UserDashboard.vue
@@ -26,7 +26,7 @@ onMounted(update_info)