Conception of kiwix::Suggestions

This commit is contained in:
Veloman Yunkan 2022-11-10 13:45:16 +04:00
parent 6285599b7c
commit 18f4a58237
3 changed files with 12 additions and 1 deletions

View File

@ -700,7 +700,7 @@ std::unique_ptr<Response> InternalServer::handle_suggest(const RequestContext& r
printf("Searching suggestions for: \"%s\"\n", queryString.c_str());
}
MustacheData results{MustacheData::type::list};
Suggestions results;
bool first = true;

View File

@ -326,3 +326,8 @@ std::string kiwix::render_template(const std::string& template_str, kainjow::mus
tmpl.render(data, [&ss](const std::string& str) { ss << str; });
return ss.str();
}
kiwix::Suggestions::Suggestions()
: kainjow::mustache::data(kainjow::mustache::data::type::list)
{
}

View File

@ -67,6 +67,12 @@ namespace kiwix
return defaultValue;
}
class Suggestions : public kainjow::mustache::data
{
public:
Suggestions();
};
}
#endif