Browse Source

* Fake login removed result

* Fixed going back from profile_id
master
vvandenb 2 years ago
parent
commit
c9c946b075
  1. 2
      front/volume/src/App.svelte
  2. 8
      front/volume/src/FakeLogin.svelte

2
front/volume/src/App.svelte

@ -261,7 +261,7 @@
</div> </div>
{/if} {/if}
{#if appState === APPSTATE.PROFILE_ID} {#if appState === APPSTATE.PROFILE_ID}
<div on:click={resetAppState} on:keydown={resetAppState}> <div on:click={() => setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)} on:keydown={() => setAppState(APPSTATE.CHANNELS + "#" + selectedChannel.name)}>
<Profile user={userProfile} edit={0} <Profile user={userProfile} edit={0}
on:view-history={openIdHistory} on:view-history={openIdHistory}
/> />

8
front/volume/src/FakeLogin.svelte

@ -3,10 +3,9 @@
export let username; export let username;
export let ftId; export let ftId;
let result = null;
async function doPost() { async function doPost() {
const res = await fetch(API_URL + "/" + ftId, { await fetch(API_URL + "/" + ftId, {
method: "POST", method: "POST",
credentials: "include", credentials: "include",
mode: "cors", mode: "cors",
@ -20,10 +19,6 @@
avatar: "no avatar", avatar: "no avatar",
}), }),
}); });
const json = await res.json();
result = JSON.stringify(json);
console.log(result);
} }
</script> </script>
@ -31,5 +26,4 @@
<input bind:value={username} /> <input bind:value={username} />
<input bind:value={ftId} /> <input bind:value={ftId} />
<button type="button" on:click={doPost}> Post it. </button> <button type="button" on:click={doPost}> Post it. </button>
<p>Result: {result}</p>
</div> </div>

Loading…
Cancel
Save