diff --git a/src/http/Server.cpp b/src/http/Server.cpp index 576d55bf5..727d98825 100644 --- a/src/http/Server.cpp +++ b/src/http/Server.cpp @@ -75,14 +75,19 @@ void Server::getLogins(const Request &r, Response *protocolResp) if (!r.CheckVerifier(key)) return; - protocolResp->setSuccess(); protocolResp->setId(r.id()); protocolResp->setVerifier(key); QList entries = findMatchingEntries(r.id(), r.url(), r.submitUrl(), r.realm()); //TODO: filtering, request confirmation [in db adaptation layer?] - if (r.sortSelection()) { - //TODO: sorting (in db adaptation layer? here?) + if (entries.count() == 0) { + protocolResp->setError("url not found!"); + } + else { + if (r.sortSelection()) { + //TODO: sorting (in db adaptation layer? here?) + } + protocolResp->setSuccess(); + protocolResp->setEntries(entries); } - protocolResp->setEntries(entries); } void Server::getLoginsCount(const Request &r, Response *protocolResp)