mirror of
https://github.com/Telecominfraproject/wlan-cloud-userportal.git
synced 2025-11-03 03:58:08 +00:00
Ficing the weird record problem.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user