Skip to content

Commit 772ccc4

Browse files
committed
fix dashboard API alignment and type check
1 parent c7163d7 commit 772ccc4

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

janus-dashboard/src/App.svelte

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,9 @@ WHERE {
163163
if (!queryId) return;
164164
165165
try {
166-
const response = await fetch(
167-
`http://localhost:8080/api/queries/${queryId}/stop`,
168-
{
169-
method: "POST",
170-
},
171-
);
166+
const response = await fetch(`http://localhost:8080/api/queries/${queryId}`, {
167+
method: "DELETE",
168+
});
172169
173170
if (response.ok) {
174171
console.log("Query stopped");

janus-dashboard/src/lib/Query.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export let onChange: (val: string) => void;
44
55
function handleInput(e: Event) {
6-
const target = e.target as HTMLAreaElement;
6+
const target = e.currentTarget as HTMLTextAreaElement;
77
onChange(target.value);
88
}
99
</script>

0 commit comments

Comments
 (0)