From 71e5830d6c9f81e49b87359e702121a1fcd9fa8a Mon Sep 17 00:00:00 2001 From: Rick Watson Date: Mon, 27 May 2019 21:21:05 +0100 Subject: [PATCH] rename endpoint --- interface/src/constants/Endpoints.js | 2 +- interface/src/containers/ManageUsers.js | 4 ++-- interface/src/containers/SecuritySettings.js | 4 ++-- src/SecurityManager.cpp | 3 +-- src/SecurityManager.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/interface/src/constants/Endpoints.js b/interface/src/constants/Endpoints.js index b3efbfa..e253c16 100644 --- a/interface/src/constants/Endpoints.js +++ b/interface/src/constants/Endpoints.js @@ -12,4 +12,4 @@ export const OTA_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "otaSettings"; export const SYSTEM_STATUS_ENDPOINT = ENDPOINT_ROOT + "systemStatus"; export const SIGN_IN_ENDPOINT = ENDPOINT_ROOT + "signIn"; export const VERIFY_AUTHORIZATION_ENDPOINT = ENDPOINT_ROOT + "verifyAuthorization"; -export const USERS_ENDPOINT = ENDPOINT_ROOT + "users"; +export const SECURITY_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "securitySettings"; diff --git a/interface/src/containers/ManageUsers.js b/interface/src/containers/ManageUsers.js index 3541728..6615054 100644 --- a/interface/src/containers/ManageUsers.js +++ b/interface/src/containers/ManageUsers.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import { USERS_ENDPOINT } from '../constants/Endpoints'; +import { SECURITY_SETTINGS_ENDPOINT } from '../constants/Endpoints'; import { restComponent } from '../components/RestComponent'; import ManageUsersForm from '../forms/ManageUsersForm'; import SectionContent from '../components/SectionContent'; @@ -30,4 +30,4 @@ class ManageUsers extends Component { } -export default restComponent(USERS_ENDPOINT, ManageUsers); +export default restComponent(SECURITY_SETTINGS_ENDPOINT, ManageUsers); diff --git a/interface/src/containers/SecuritySettings.js b/interface/src/containers/SecuritySettings.js index 642c9fb..f6adb11 100644 --- a/interface/src/containers/SecuritySettings.js +++ b/interface/src/containers/SecuritySettings.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; -import { USERS_ENDPOINT } from '../constants/Endpoints'; +import { SECURITY_SETTINGS_ENDPOINT } from '../constants/Endpoints'; import { restComponent } from '../components/RestComponent'; import SecuritySettingsForm from '../forms/SecuritySettingsForm'; import SectionContent from '../components/SectionContent'; @@ -29,4 +29,4 @@ class SecuritySettings extends Component { } -export default restComponent(USERS_ENDPOINT, SecuritySettings); +export default restComponent(SECURITY_SETTINGS_ENDPOINT, SecuritySettings); diff --git a/src/SecurityManager.cpp b/src/SecurityManager.cpp index 510e2c5..36bd636 100644 --- a/src/SecurityManager.cpp +++ b/src/SecurityManager.cpp @@ -1,6 +1,6 @@ #include -SecurityManager::SecurityManager(AsyncWebServer* server, FS* fs) : SettingsService(server, fs, USERS_PATH, SECURITY_SETTINGS_FILE) {} +SecurityManager::SecurityManager(AsyncWebServer* server, FS* fs) : SettingsService(server, fs, SECURITY_SETTINGS_PATH, SECURITY_SETTINGS_FILE) {} SecurityManager::~SecurityManager() {} void SecurityManager::readFromJsonObject(JsonObject& root) { @@ -33,7 +33,6 @@ void SecurityManager::writeToJsonObject(JsonObject& root) { } void SecurityManager::begin() { - // read config readFromFS(); } diff --git a/src/SecurityManager.h b/src/SecurityManager.h index d3ac577..c289b81 100644 --- a/src/SecurityManager.h +++ b/src/SecurityManager.h @@ -12,7 +12,7 @@ #define SECURITY_SETTINGS_FILE "/config/securitySettings.json" -#define USERS_PATH "/rest/users" +#define SECURITY_SETTINGS_PATH "/rest/securitySettings" #define AUTHORIZATION_HEADER "Authorization" #define AUTHORIZATION_HEADER_PREFIX "Bearer "