Ficing the weird record problem.

This commit is contained in:
stephb9959
2021-12-14 08:32:14 -08:00
parent becd83ef1b
commit 8bb7a81768
4 changed files with 13 additions and 5 deletions

View File

@@ -762,7 +762,7 @@ paths:
400:
$ref: '#/components/responses/Error'
/wiredClients:
/wiredclients:
get:
tags:
- Clients
@@ -782,7 +782,7 @@ paths:
schema:
$ref: '#/components/schemas/ClientList'
/wifiClients:
/wificlients:
get:
tags:
- WiFi Clients

View File

@@ -18,7 +18,7 @@ namespace OpenWifi {
TransactionId,
Internal,true, false, RateLimit{.Interval=1000,.MaxCalls=10}, true){}
static const std::list<const char *> PathName() { return std::list<const char *>{"/api/v1/wifiClients"}; };
static const std::list<const char *> PathName() { return std::list<const char *>{"/api/v1/wificlients"}; };
inline bool RoleIsAuthorized(std::string & Reason) {
if(UserInfo_.userinfo.userRole != SecurityObjects::USER_ROLE::SUBSCRIBER) {

View File

@@ -18,7 +18,7 @@ namespace OpenWifi {
TransactionId,
Internal,true, false, RateLimit{.Interval=1000,.MaxCalls=10}, true){}
static const std::list<const char *> PathName() { return std::list<const char *>{"/api/v1/wiredClients"}; };
static const std::list<const char *> PathName() { return std::list<const char *>{"/api/v1/wiredclients"}; };
inline bool RoleIsAuthorized(std::string & Reason) {
if(UserInfo_.userinfo.userRole != SecurityObjects::USER_ROLE::SUBSCRIBER) {

View File

@@ -37,7 +37,7 @@ target_service_endpoint="${OWSUB}"
token=""
result_file=result.json
username="stephane.bourque@test.com"
username="stephane.bourque@subs.com"
password="NoMoreN00bs!"
browser_list=(firefox sensible-browser xdg-open w3m links links2 lynx youtube-dl)
browser=""
@@ -165,6 +165,13 @@ blink() {
jq < ${result_file}
};
wificlients() {
curl ${FLAGS} -X GET "https://${target_service_endpoint}/api/v1/wificlients?serialNumber=$1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" > ${result_file}
jq < ${result_file}
};
shopt -s nocasematch
case "$1" in
"login") login; echo "You successfully logged in." ; logout ;;
@@ -176,6 +183,7 @@ case "$1" in
"getmyinfo") login; getmyinfo ; logout;;
"reboot") login; reboot "$2" ; logout ;;
"blink") login; blink "$2" ; logout ;;
"wificlients") login; wificlients "$2" ; logout ;;
*) help ;;
esac