Update hazard list API to use relative URLS. (Much better for subdirectory hosting!)
Some checks are pending
build-docker / Build Image (push) Waiting to run
Some checks are pending
build-docker / Build Image (push) Waiting to run
This commit is contained in:
parent
e2f7475464
commit
31c0aced4a
2 changed files with 4 additions and 2 deletions
|
|
@ -8,6 +8,7 @@ import WeatherDisplay from './weatherdisplay.mjs';
|
|||
import { registerDisplay } from './navigation.mjs';
|
||||
import calculateScrollTiming from './utils/scroll-timing.mjs';
|
||||
import { debugFlag } from './utils/debug.mjs';
|
||||
import { withBasePath } from './utils/base-path.mjs';
|
||||
|
||||
const hazardLevels = {
|
||||
Extreme: 10,
|
||||
|
|
@ -289,7 +290,7 @@ class Hazards extends WeatherDisplay {
|
|||
}));
|
||||
|
||||
// Send to backend
|
||||
await fetch('/api/hazard-history', {
|
||||
await fetch(withBasePath('api/hazard-history'), {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue