From 66fd863502691608d84f28dc43501c1265844c57 Mon Sep 17 00:00:00 2001 From: "rjwats@gmail.com" Date: Sun, 1 Apr 2018 10:35:40 +0100 Subject: [PATCH] prefix settings paths with /rest in interface --- interface/src/constants/Endpoints.js | 39 +++++++++------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/interface/src/constants/Endpoints.js b/interface/src/constants/Endpoints.js index 0860084..88999ea 100644 --- a/interface/src/constants/Endpoints.js +++ b/interface/src/constants/Endpoints.js @@ -1,28 +1,13 @@ -export const ENDPOINT_ROOT = ""; +const ENDPOINT_HOST = "http://192.168.0.20"; +const ENDPOINT_PATH = "/rest"; +const ENDPOINT_PREFIX = ENDPOINT_HOST + ENDPOINT_PATH; -export const NTP_STATUS_PATH = "/ntpStatus"; -export const NTP_STATUS_ENDPOINT = ENDPOINT_ROOT + NTP_STATUS_PATH; - -export const NTP_SETTINGS_PATH = "/ntpSettings"; -export const NTP_SETTINGS_ENDPOINT = ENDPOINT_ROOT + NTP_SETTINGS_PATH; - -export const AP_SETTINGS_PATH = "/apSettings"; -export const AP_SETTINGS_ENDPOINT = ENDPOINT_ROOT + AP_SETTINGS_PATH; - -export const AP_STATUS_PATH = "/apStatus"; -export const AP_STATUS_ENDPOINT = ENDPOINT_ROOT + AP_STATUS_PATH; - -export const SCAN_NETWORKS_PATH = "/scanNetworks"; -export const SCAN_NETWORKS_ENDPOINT = ENDPOINT_ROOT + SCAN_NETWORKS_PATH; - -export const LIST_NETWORKS_PATH = "/listNetworks"; -export const LIST_NETWORKS_ENDPOINT = ENDPOINT_ROOT + LIST_NETWORKS_PATH; - -export const WIFI_SETTINGS_PATH = "/wifiSettings"; -export const WIFI_SETTINGS_ENDPOINT = ENDPOINT_ROOT + WIFI_SETTINGS_PATH; - -export const WIFI_STATUS_PATH = "/wifiStatus"; -export const WIFI_STATUS_ENDPOINT = ENDPOINT_ROOT + WIFI_STATUS_PATH; - -export const OTA_SETTINGS_PATH = "/otaSettings"; -export const OTA_SETTINGS_ENDPOINT = ENDPOINT_ROOT + OTA_SETTINGS_PATH; +export const NTP_STATUS_ENDPOINT = ENDPOINT_PREFIX + "/ntpStatus"; +export const NTP_SETTINGS_ENDPOINT = ENDPOINT_PREFIX + "/ntpSettings"; +export const AP_SETTINGS_ENDPOINT = ENDPOINT_PREFIX + "/apSettings"; +export const AP_STATUS_ENDPOINT = ENDPOINT_PREFIX + "/apStatus"; +export const SCAN_NETWORKS_ENDPOINT = ENDPOINT_PREFIX + "/scanNetworks"; +export const LIST_NETWORKS_ENDPOINT = ENDPOINT_PREFIX + "/listNetworks"; +export const WIFI_SETTINGS_ENDPOINT = ENDPOINT_PREFIX + "/wifiSettings"; +export const WIFI_STATUS_ENDPOINT = ENDPOINT_PREFIX + "/wifiStatus"; +export const OTA_SETTINGS_ENDPOINT = ENDPOINT_PREFIX + "/otaSettings";