1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-10-02 15:00:02 +00:00

Get the pre-cached highlighted pastie if available.

This commit is contained in:
King_DuckZ 2017-08-08 00:09:03 +01:00
commit b7a5ce09e1
11 changed files with 129 additions and 40 deletions

View file

@ -62,7 +62,11 @@ namespace kamokan {
return submission_res;
}
Storage::RetrievedPastie FakeStorage::retrieve_pastie (const boost::string_view& parToken, uint32_t parMaxTokenLen) const {
Storage::RetrievedPastie FakeStorage::retrieve_pastie (
const boost::string_view& parToken,
uint32_t parMaxTokenLen,
const boost::string_view& parLang
) const {
auto it_found = std::find_if(
m_submitted_pasties.begin(),
m_submitted_pasties.end(),

View file

@ -52,7 +52,11 @@ namespace kamokan {
const std::string& parRemoteIP
) const override;
kamokan_virtual_testing Storage::RetrievedPastie retrieve_pastie (const boost::string_view& parToken, uint32_t parMaxTokenLen) const override;
kamokan_virtual_testing Storage::RetrievedPastie retrieve_pastie (
const boost::string_view& parToken,
uint32_t parMaxTokenLen,
const boost::string_view& parLang
) const override;
const std::vector<SubmittedPastie>& submitted_pasties() const;