update js files

This commit is contained in:
glyph 2021-11-15 17:30:44 +02:00
parent 8306239ee9
commit fe30705178
4 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ PEACH.add = function() {
// write in-progress status message to ui
PEACH.flashMsg("info", "Saving new password.");
// send add_wifi POST request
fetch("/api/v1/settings/change_password", {
fetch("/api/v1/admin/change_password", {
method: "post",
headers: {
'Content-Type': 'application/json',

View File

@ -38,7 +38,7 @@ PEACH_DNS.add = function() {
// write in-progress status message to ui
PEACH_DNS.flashMsg("info", "Saving new DNS configurations");
// send add_wifi POST request
fetch("/api/v1/dns/configure", {
fetch("/api/v1/network/dns/configure", {
method: "post",
headers: {
'Content-Type': 'application/json',

View File

@ -1,7 +1,7 @@
/*
behavioural layer for the `shutdown.html.tera` template,
corresponding to the web route `/shutdown`
behavioural layer for the `power.html.tera` template,
corresponding to the web route `/power`
- intercept button clicks for reboot & shutdown
- perform json api calls
@ -28,7 +28,7 @@ PEACH_DEVICE.reboot = function() {
// write reboot flash message
PEACH_DEVICE.flashMsg("success", "Rebooting the device...");
// send reboot_device POST request
fetch("/api/v1/device/reboot", {
fetch("/api/v1/admin/reboot", {
method: "post",
headers: {
'Accept': 'application/json',
@ -59,7 +59,7 @@ PEACH_DEVICE.shutdown = function() {
// write shutdown flash message
PEACH_DEVICE.flashMsg("success", "Shutting down the device...");
// send shutdown_device POST request
fetch("/api/v1/device/shutdown", {
fetch("/api/v1/shutdown", {
method: "post",
headers: {
'Accept': 'application/json',

View File

@ -23,7 +23,7 @@ PEACH.add = function() {
// write in-progress status message to ui
PEACH.flashMsg("info", "Saving new password.");
// send add_wifi POST request
fetch("/public/api/v1/reset_password", {
fetch("/api/v1/admin/reset_password", {
method: "post",
headers: {
'Content-Type': 'application/json',