You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
543 B

2 months ago
#include "UserController.h"
RCCPP_RUNTIME_TYPE_REGISTRATION(UserController)
/**
* @brief
* @route GET /api/v1/users
* @response 200 JSON
*/
void UserController::asyncHandleHttpRequest(
const drogon::HttpRequestPtr &req,
std::function<void(const drogon::HttpResponsePtr &)> &&callback)
{
Json::Value ret;
ret["status"] = "ok";
ret["message"] = "Hello from RCC++!";
ret["data"] = Json::arrayValue;
auto resp = drogon::HttpResponse::newHttpJsonResponse(ret);
callback(resp);
}