Version API and add spot_allowed to options call. Closes #35

This commit is contained in:
Ian Renton
2025-10-09 15:35:29 +01:00
parent c66693fc99
commit 277743dac7
5 changed files with 20 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ var alerts = []
// Load alerts and populate the table.
function loadAlerts() {
$.getJSON('/api/alerts' + buildQueryString(), function(jsonData) {
$.getJSON('/api/v1/alerts' + buildQueryString(), function(jsonData) {
// Store last updated time
lastUpdateTime = moment.utc();
updateRefreshDisplay();
@@ -177,7 +177,7 @@ function addAlertRowsToTable(tbody, alerts) {
// Load server options. Once a successful callback is made from this, we then query alerts.
function loadOptions() {
$.getJSON('/api/options', function(jsonData) {
$.getJSON('/api/v1/options', function(jsonData) {
// Store options
options = jsonData;

View File

@@ -6,7 +6,7 @@ var spots = []
// Load spots and populate the table.
function loadSpots() {
$.getJSON('/api/spots' + buildQueryString(), function(jsonData) {
$.getJSON('/api/v1/spots' + buildQueryString(), function(jsonData) {
// Store last updated time
lastUpdateTime = moment.utc();
updateRefreshDisplay();
@@ -155,7 +155,7 @@ function updateTable() {
// Load server options. Once a successful callback is made from this, we then query spots and set up the timer to query
// spots repeatedly.
function loadOptions() {
$.getJSON('/api/options', function(jsonData) {
$.getJSON('/api/v1/options', function(jsonData) {
// Store options
options = jsonData;

View File

@@ -1,6 +1,6 @@
// Load server status
function loadStatus() {
$.getJSON('/api/status', function(jsonData) {
$.getJSON('/api/v1/status', function(jsonData) {
$("#status-container").empty();
$("#status-container").append(generateStatusCard("Server Information", [
`Software Version: ${jsonData["software-version"]}`,