From fd1332a3df191577e91c6d846a8b5db1747099fd Mon Sep 17 00:00:00 2001
From: Zach Berwaldt <zberwaldt@tutamail.com>
Date: Fri, 15 Mar 2024 22:00:10 -0400
Subject: cleanup

---
 fe/src/lib/forms/AddForm.svelte | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'fe/src/lib/forms/AddForm.svelte')

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 @@
     import { createEventDispatcher } from "svelte";
     import { token, user } from "../../stores/auth";
     import type { Statistic } from "../../types";
+    import { apiURL } from "../../utils";
 
     export let open: boolean;
 
@@ -37,7 +38,7 @@
     async function handleSubmitStat()
     {
         const { date, quantity } = statistic;
-        await fetch("http://localhost:8080/api/v1/stats/", {
+        await fetch(apiURL("stats"), {
             method: "POST",
             headers: {
                 Authorization: `Bearer ${$token}`
-- 
cgit v1.1

