mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 18:15:18 -04:00
More fixes in JSON API
Schedule delayed async session closing properly (without recurrence) Fix double capture of this in async method registering, that was causing compilation error for Android Fix minor compiler warning in jsonapi-generator
This commit is contained in:
parent
76dfa04bb5
commit
2d7b855983
3 changed files with 9 additions and 16 deletions
|
@ -18,8 +18,8 @@
|
|||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
registerHandler("$%apiPath%$",
|
||||
[this, $%captureVars%$](const std::shared_ptr<rb::Session> session)
|
||||
registerHandler( "$%apiPath%$",
|
||||
[this](const std::shared_ptr<rb::Session> session)
|
||||
{
|
||||
const std::multimap<std::string, std::string> headers
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ registerHandler("$%apiPath%$",
|
|||
session->yield(rb::OK, headers);
|
||||
|
||||
size_t reqSize = session->get_request()->get_header("Content-Length", 0);
|
||||
session->fetch( reqSize, [this, $%captureVars%$](
|
||||
session->fetch( reqSize, [this](
|
||||
const std::shared_ptr<rb::Session> session,
|
||||
const rb::Bytes& body )
|
||||
{
|
||||
|
@ -74,5 +74,4 @@ $%outputParamsSerialization%$
|
|||
session->yield(message.str());
|
||||
$%sessionDelayedClose%$
|
||||
} );
|
||||
}, $%requiresAuth%$);
|
||||
|
||||
}, $%requiresAuth%$ );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue