Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

ui: avoid "async race" with new client POST #35

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/src/Clients.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
async function handleNewClick(event) {
const res = await fetch(clientsUrl, {
method: "POST",
}).then(getClients());
});
let newClient = await res.json();
console.log("New client added", newClient);
await getClients();
}

onMount(getClients);
Expand Down