39 return std::make_unique<CheckUpdate>(ctx);
44 std::vector<ActionActionParam> perm_;
54 ASSERT_LOG(srv_ptr,
"Cannot retrieve UpdateService.");
55 json ret = json::array();
56 auto updates = srv_ptr->check_update();
58 for (
const auto &update_desc : updates)
CheckUpdate(RequestContext ctx)
This service provides various update management utilities.
std::vector< ActionActionParam > required_permission(const json &req) const override
Return a list of "Action" / "ActionParam" that must pass before the request is processed.
The base class for API method handler implementation.
This is the header file for a generated source file, GitSHA1.cpp.
virtual json process_impl(const json &req) override
The API method implementation.
ServiceRegistry & get_service_registry()
A function to retrieve the ServiceRegistry from pretty much anywhere.
static json serialize(const UpdateDescriptor &in)
std::unique_ptr< MethodHandler > MethodHandlerUPtr
Requires that the user be at least manager.
static MethodHandlerUPtr create(RequestContext)
#define ASSERT_LOG(cond, msg)
std::shared_ptr< ServiceInterface > get_service() const
Retrieve the service instance implementing the ServiceInterface, or nullptr if no such service was re...
Holds valuable pointer to provide context to a request.