mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-08-03 12:50:02 +00:00
Clean up and make a separate class for pasties from curl-style requests.
This commit is contained in:
parent
a2676ad5c7
commit
1507c79503
6 changed files with 96 additions and 22 deletions
|
@ -35,16 +35,12 @@ namespace tawashi {
|
|||
|
||||
protected:
|
||||
virtual boost::string_ref page_basename() const override { assert(false); return boost::string_ref(""); }
|
||||
virtual HttpHeader make_success_response (std::string&& parPastieParam);
|
||||
|
||||
private:
|
||||
typedef std::pair<boost::optional<std::string>, HttpHeader> StringOrHeader;
|
||||
virtual HttpHeader on_process() override;
|
||||
virtual void on_mustache_prepare (mstch::map& parContext) override;
|
||||
virtual std::string on_mustache_retrieve() override;
|
||||
StringOrHeader submit_to_redis (const boost::string_ref& parText, uint32_t parExpiry, const boost::string_ref& parLang);
|
||||
|
||||
//TODO: remove, this shouldn't be in this class, nor on_mustache_prepare
|
||||
//or on_mustache_retrieve.
|
||||
std::string m_redirect_to;
|
||||
virtual HttpHeader on_process() override;
|
||||
StringOrHeader submit_to_redis (const boost::string_ref& parText, uint32_t parExpiry, const boost::string_ref& parLang);
|
||||
};
|
||||
} //namespace tawashi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue