Skip to content

Commit b8a227b

Browse files
committed
Update Auth to use JWT
1 parent 109d2e3 commit b8a227b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lib/Header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<svelte:fragment>
4141
{#if $url != ''}
4242
<h3 class="text-center">
43-
{$url} v{#if $api_version != '-1'}{$api_version}{:else} not supported version{/if}
43+
{$url} <!--v{#if $api_version != '-1'}{$api_version}{:else} not supported version{/if}-->
4444
</h3>
4545
{:else}
4646
<h3 class="text-red-500 text-center">

src/routes/settings/+page.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
let headersList = {
3737
Accept: '*/*',
3838
Authorization: 'Basic ' + btoa(username_ + ':' + password_),
39-
'content-type': 'application/json'
39+
'content-type': 'application/json',
40+
// 'Content-Security-Policy-Report-Only': 'default-src https: "unsafe-inline" "unsafe-eval"'
4041
};
4142
4243
let response = await fetch($url + '/api/tokens', {
@@ -48,7 +49,7 @@
4849
let data = await response.json();
4950
console.log(data);
5051
51-
token.set(data['token']);
52+
token.set(data['Jwt']);
5253
username.set(username_);
5354
} else {
5455
failed = true;

0 commit comments

Comments
 (0)