diff --git a/web/frontend/src/api.ts b/web/frontend/src/api.ts index 89afee3..c912a0f 100644 --- a/web/frontend/src/api.ts +++ b/web/frontend/src/api.ts @@ -1,4 +1,4 @@ -const BASE = 'http://localhost:8420/api' +const BASE = '/api' async function get(path: string): Promise { const res = await fetch(`${BASE}${path}`) diff --git a/web/frontend/src/views/ProjectView.vue b/web/frontend/src/views/ProjectView.vue index 06e608f..d225ca3 100644 --- a/web/frontend/src/views/ProjectView.vue +++ b/web/frontend/src/views/ProjectView.vue @@ -133,7 +133,7 @@ async function addDecision() { category: decForm.value.category || undefined, tags, } - const res = await fetch('http://localhost:8420/api/decisions', { + const res = await fetch('/api/decisions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body),