aboutsummaryrefslogtreecommitdiff
path: root/fe/src/lib/forms/AddForm.svelte
diff options
context:
space:
mode:
authorZach Berwaldt <zberwaldt@tutamail.com>2024-03-15 22:00:10 -0400
committerZach Berwaldt <zberwaldt@tutamail.com>2024-03-15 22:00:10 -0400
commitfd1332a3df191577e91c6d846a8b5db1747099fd (patch)
treeb3f045cd06d6622e23441b442e8f3861050ed444 /fe/src/lib/forms/AddForm.svelte
parentcc49361bcbf689510035e7bbdcce9d8467a36282 (diff)
cleanup
Diffstat (limited to 'fe/src/lib/forms/AddForm.svelte')
-rw-r--r--fe/src/lib/forms/AddForm.svelte3
1 files changed, 2 insertions, 1 deletions
diff --git a/fe/src/lib/forms/AddForm.svelte b/fe/src/lib/forms/AddForm.svelte
index 4520b1b..f85cce6 100644
--- a/fe/src/lib/forms/AddForm.svelte
+++ b/fe/src/lib/forms/AddForm.svelte
@@ -2,6 +2,7 @@
2 import { createEventDispatcher } from "svelte"; 2 import { createEventDispatcher } from "svelte";
3 import { token, user } from "../../stores/auth"; 3 import { token, user } from "../../stores/auth";
4 import type { Statistic } from "../../types"; 4 import type { Statistic } from "../../types";
5 import { apiURL } from "../../utils";
5 6
6 export let open: boolean; 7 export let open: boolean;
7 8
@@ -37,7 +38,7 @@
37 async function handleSubmitStat() 38 async function handleSubmitStat()
38 { 39 {
39 const { date, quantity } = statistic; 40 const { date, quantity } = statistic;
40 await fetch("http://localhost:8080/api/v1/stats/", { 41 await fetch(apiURL("stats"), {
41 method: "POST", 42 method: "POST",
42 headers: { 43 headers: {
43 Authorization: `Bearer ${$token}` 44 Authorization: `Bearer ${$token}`