👽️ upgrade sveltekit
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description" content="" />
|
||||
<link rel="icon" href="%svelte.assets%/favicon.png" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
%svelte.head%
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body>
|
||||
<div>%svelte.body%</div>
|
||||
<body data-sveltekit-prefetch>
|
||||
<div>%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
|
||||
const verifyCredentials = async(instance: string, token: string) => {
|
||||
const verifyCredentials = async (instance: string, token: string) => {
|
||||
const url = `${instance}/api/v1/accounts/verify_credentials`;
|
||||
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
}
|
||||
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
}
|
||||
});
|
||||
return await response.json();
|
||||
}
|
||||
};
|
||||
|
||||
const user = {
|
||||
verifyCredentials
|
||||
verifyCredentials
|
||||
};
|
||||
|
||||
export default user;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Login from '$components/Login.svelte';
|
||||
import Login from '../components/Login.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -1,6 +1,6 @@
|
||||
import { writable } from 'svelte/store'
|
||||
import type { Writable } from 'svelte/store'
|
||||
import { writable } from 'svelte/store';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
export const userStore: Writable<object | null> = writable(null);
|
||||
|
||||
export const tokenStore: Writable<string | null> = writable(null);
|
||||
export const tokenStore: Writable<string | null> = writable(null);
|
||||
|
||||
Reference in New Issue
Block a user