mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐎🔨 modified endpoints to better adhere to JSON API conventions
This commit is contained in:
parent
1f0a3dc28d
commit
386a140255
1 changed files with 4 additions and 4 deletions
|
|
@ -10,13 +10,13 @@ drogon::HttpResponsePtr drogon::toResponse(BankResponse &&data)
|
|||
std::shared_ptr<HttpResponseImpl> res;
|
||||
if (data.first == k204NoContent)
|
||||
{
|
||||
res = std::make_shared<HttpResponseImpl>(data.first, CT_APPLICATION_JSON);
|
||||
res->setBody(std::move(data.second));
|
||||
res = std::make_shared<HttpResponseImpl>();
|
||||
res->setStatusCode(data.first);
|
||||
}
|
||||
else
|
||||
{
|
||||
res = std::make_shared<HttpResponseImpl>();
|
||||
res->setStatusCode(data.first);
|
||||
res = std::make_shared<HttpResponseImpl>(data.first, CT_APPLICATION_JSON);
|
||||
res->setBody(std::move(data.second));
|
||||
}
|
||||
const auto &advices = HttpAppFrameworkImpl::instance().getResponseCreationAdvices();
|
||||
if (!advices.empty())
|
||||
|
|
|
|||
Loading…
Reference in a new issue