| 618 | } |
| 619 | |
| 620 | bool NetworkService::editResource(std::string const& simId, std::string const& newName, std::string const& newDescription) |
| 621 | { |
| 622 | log(Priority::Important, "network: edit resource with id=" + simId); |
| 623 | |
| 624 | httplib::SSLClient client(_serverAddress); |
| 625 | configureClient(client); |
| 626 | |
| 627 | httplib::Params params; |
| 628 | params.emplace("userName", *_loggedInUserName); |
| 629 | params.emplace("password", *_password); |
| 630 | params.emplace("simId", simId); |
| 631 | params.emplace("newName", newName); |
| 632 | params.emplace("newDescription", newDescription); |
| 633 | |
| 634 | try { |
| 635 | auto result = executeRequest([&] { return client.Post("/alien-server/editsimulation.php", params); }); |
| 636 | return parseBoolResult(result->body); |
| 637 | } catch (...) { |
| 638 | logNetworkError(); |
| 639 | return false; |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | bool NetworkService::moveResource(std::string const& simId, WorkspaceType targetWorkspace) |
| 644 | { |
no test coverage detected