rename endpoint

This commit is contained in:
Rick Watson 2019-05-27 21:21:05 +01:00
parent c8857f06ac
commit 71e5830d6c
5 changed files with 7 additions and 8 deletions

View File

@ -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";

View File

@ -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);

View File

@ -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);

View File

@ -1,6 +1,6 @@
#include <SecurityManager.h>
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();
}

View File

@ -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 "