Skip to content

Commit

Permalink
fix: only make localhost calls
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Jan 16, 2024
1 parent fdfb7de commit dc8281c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions controller/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
origins = [
"http://localhost",
"http://localhost:5173",
"*",
]

app.add_middleware(
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/routes/config/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
$: state = data.state;
async function saveConfig() {
await fetch('http://0.0.0.0:8000/state', {
await fetch('http://localhost:8000/state', {
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
body: JSON.stringify(state)
});
await invalidate('http://0.0.0.0:8000/state');
await invalidate('http://0.0.0.0:8000/available_modules');
await invalidate('http://localhost:8000/state');
await invalidate('http://localhost:8000/available_modules');
}
$: console.log(selected);
Expand Down

0 comments on commit dc8281c

Please sign in to comment.