This commit is contained in:
stephb9959
2023-04-14 08:58:46 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenWifi {
Poco::Net::HTTPRequest::HTTP_DELETE,
Poco::Net::HTTPRequest::HTTP_OPTIONS},
Server, TransactionId, Internal) {}
static auto PathName() { return std::list<std::string>{"/api/v1/simulation"}; }
static auto PathName() { return std::list<std::string>{"/api/v1/simulation/{id}"}; }
void DoGet() final;
void DoPost() final;
void DoPut() final;

View File

@@ -136,8 +136,8 @@ createsim() {
fi
}
listsim() {
curl ${FLAGS} -X GET "https://${OWLS}/api/v1/simulation" \
listsims() {
curl ${FLAGS} -X GET "https://${OWLS}/api/v1/simulation/*" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" > ${result_file}
jq < ${result_file}
@@ -190,7 +190,7 @@ case "$1" in
"login") login; echo "You succesfully logged in..." ; logout ;;
"examplesim") examplesim;;
"createsim") login; createsim "$2"; logout;;
"listsim") login; listsim; logout;;
"listsims") login; listsims; logout;;
"deletesim") login; deletesim "$2"; logout;;
"startsim") login; startsim "$2"; logout;;
"stopsim") login; stopsim "$2" ; logout;;