Change parseBool() to return optional bool value

This commit is contained in:
Vladimir Golovnev (Glassez) 2021-01-03 15:33:32 +03:00
parent 4429a16ca8
commit d0cac421bb
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
6 changed files with 24 additions and 19 deletions

View file

@ -89,7 +89,7 @@ void RSSController::moveItemAction()
void RSSController::itemsAction()
{
const bool withData {parseBool(params()["withData"], false)};
const bool withData {parseBool(params()["withData"]).value_or(false)};
const auto jsonVal = RSS::Session::instance()->rootFolder()->toJsonValue(withData);
setResult(jsonVal.toObject());