1
0
Fork 0
mirror of https://gitlab.com/niansa/commsy-rest.git synced 2025-03-06 20:48:27 +01:00

Fixed default number of posts

This commit is contained in:
niansa 2020-09-16 17:09:53 +02:00
parent d0ab6c1c94
commit 0551e15aea

View file

@ -9,10 +9,9 @@ using namespace drogon;
int main() {
// Register handlers
app().registerHandler("/fetchList?url={serverUrl}&sid={sid}&room={room}&startId={startId}&maxPosts={maxPosts}",
[](const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback,
[](const HttpRequestPtr& /*req*/, std::function<void (const HttpResponsePtr &)> &&callback,
const std::string &serverUrl, const std::string &sid, const std::string &room, const std::string &startId, std::string maxPosts)
{
//std::string maxPosts = _maxPosts;
if (maxPosts.empty()) {
maxPosts = "0";
}