mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-22 17:15:18 -04:00
adding kind and path attributes to suggest response object and using it in autocomplete
This commit is contained in:
1 parent
e4be97a032
commit
5cb276a933
3 files changed
+17
-6
No files matched your search
@@ -416,6 +416,8 @@ std::unique_ptr<Response> InternalServer::handle_suggest(const RequestContext& r
|
||||
MustacheData result;
|
||||
result.set("label", suggestion[0]);
|
||||
result.set("value", suggestion[0]);
|
||||
result.set("kind", "path");
|
||||
result.set("path", suggestion[1]);
|
||||
result.set("first", first);
|
||||
first = false;
|
||||
results.push_back(result);
|
||||
@@ -428,6 +430,7 @@ std::unique_ptr<Response> InternalServer::handle_suggest(const RequestContext& r
|
||||
MustacheData result;
|
||||
result.set("label", "containing '" + term + "'...");
|
||||
result.set("value", term + " ");
|
||||
result.set("kind", "pattern");
|
||||
result.set("first", first);
|
||||
results.push_back(result);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user