Skip to content

Commit

Permalink
Fix hardcoded API endpoints. (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
impoiler committed Sep 17, 2023
1 parent ec816e9 commit 66db637
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
let fileName = files.item(0).name;
await fetch("http://localhost:8000/transcribe", {
await fetch("/transcribe", {
method: "POST",
body: formData,
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ModelSelectOption.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
models.then((data) => {
if (data[id] === false) {
fetch(`http://localhost:8000/size?model=${id}`)
fetch(`/size?model=${id}`)
.then((res) => res.json())
.then((modelSize) => (size = modelSize));
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function fileSize(fileSize: number) {
}

export async function fetchModels() {
const res = await fetch("http://localhost:8000/models");
const res = await fetch("/models");
return await res.json();
}

Expand Down

0 comments on commit 66db637

Please sign in to comment.