mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-12-27 21:35:41 +00:00
Remove pastie_page token and add a submit_page one instead (bool).
This commit is contained in:
parent
070c814387
commit
00e27a774a
5 changed files with 4 additions and 2 deletions
|
@ -36,5 +36,6 @@ namespace kamokan {
|
|||
private:
|
||||
virtual void on_general_mustache_prepare (std::string&& parPastie, mstch::map& parContext) override;
|
||||
virtual tawashi::HttpHeader on_general_pastie_process() override;
|
||||
virtual bool is_submit_page() override { return true; }
|
||||
};
|
||||
} //namespace kamokan
|
||||
|
|
|
@ -67,7 +67,6 @@ namespace kamokan {
|
|||
|
||||
parContext["self_destructed"] = m_pastie_info.self_destructed;
|
||||
parContext["pastie_token"] = get_search_token(cgi_env());
|
||||
parContext["pastie_page"] = true;
|
||||
|
||||
this->on_general_mustache_prepare(std::move(*m_pastie_info.pastie), parContext);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace kamokan {
|
|||
|
||||
protected:
|
||||
virtual boost::string_view page_basename() const override { return boost::string_view("index"); }
|
||||
virtual bool is_submit_page() override { return true; }
|
||||
|
||||
private:
|
||||
};
|
||||
|
|
|
@ -174,7 +174,7 @@ namespace kamokan {
|
|||
statuslog->info("Sending response");
|
||||
SPDLOG_TRACE(statuslog, "Preparing mustache dictionary");
|
||||
mstch::map mustache_context {
|
||||
{"pastie_page", false},
|
||||
{"submit_page", this->is_submit_page()},
|
||||
{"version", boost::string_view{STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH)}},
|
||||
{"tawashi_version", tawashi::version()},
|
||||
{"base_uri", base_uri()},
|
||||
|
|
|
@ -69,6 +69,7 @@ namespace kamokan {
|
|||
virtual tawashi::HttpHeader on_process();
|
||||
virtual void on_mustache_prepare (mstch::map& parContext);
|
||||
virtual std::string on_mustache_retrieve();
|
||||
virtual bool is_submit_page() { return false; }
|
||||
|
||||
Storage m_storage;
|
||||
Kakoune::SafePtr<cgi::Env> m_cgi_env;
|
||||
|
|
Loading…
Reference in a new issue