mirror of
https://github.com/Telecominfraproject/wlan-cloud-userportal.git
synced 2025-11-02 03:27:48 +00:00
Adding default config creation.
This commit is contained in:
@@ -8,18 +8,22 @@
|
||||
namespace OpenWifi {
|
||||
|
||||
void RESTAPI_signup_handler::DoPost() {
|
||||
std::cout << "Doing signup DoPost" << std::endl;
|
||||
return API_Proxy(Logger(), Request, Response, uSERVICE_PROVISIONING.c_str(), "/api/v1/signup", 60000);
|
||||
}
|
||||
|
||||
void RESTAPI_signup_handler::DoPut() {
|
||||
std::cout << "Doing signup DoPut" << std::endl;
|
||||
return API_Proxy(Logger(), Request, Response, uSERVICE_PROVISIONING.c_str(), "/api/v1/signup", 60000);
|
||||
}
|
||||
|
||||
void RESTAPI_signup_handler::DoGet() {
|
||||
std::cout << "Doing signup DoGet" << std::endl;
|
||||
return API_Proxy(Logger(), Request, Response, uSERVICE_PROVISIONING.c_str(), "/api/v1/signup", 60000);
|
||||
}
|
||||
|
||||
void RESTAPI_signup_handler::DoDelete() {
|
||||
std::cout << "Doing signup DoDelete" << std::endl;
|
||||
return API_Proxy(Logger(), Request, Response, uSERVICE_PROVISIONING.c_str(), "/api/v1/signup", 60000);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,12 @@ wiredclients() {
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
signup() {
|
||||
curl ${FLAGS} -X POST "https://${target_service_endpoint}/api/v1/signup?stephane.bourque@gmail.com&serialNumber=24f5a207a130" \
|
||||
-H "Content-Type: application/json" > ${result_file}
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
shopt -s nocasematch
|
||||
case "$1" in
|
||||
"login") login; echo "You successfully logged in." ; logout ;;
|
||||
@@ -192,6 +198,7 @@ case "$1" in
|
||||
"blink") login; blink "$2" ; logout ;;
|
||||
"wificlients") login; wificlients "$2" ; logout ;;
|
||||
"wiredclients") login; wiredclients "$2" ; logout ;;
|
||||
"signup") signup ;;
|
||||
*) help ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user