Renamed 404.html to error.html

404.html no longer contains anything specific to the 404 error and will
henceforth serve (with some enhancements) as a general purpose error
page template.
This commit is contained in:
Veloman Yunkan 2022-01-30 16:49:00 +04:00 committed by Matthieu Gautier
parent 647118dd5e
commit 89dc9afc28
4 changed files with 2 additions and 5 deletions

View File

@ -100,14 +100,13 @@ std::unique_ptr<ContentResponse> ContentResponseBlueprint::generateResponseObjec
HTTPErrorHtmlResponse::HTTPErrorHtmlResponse(const InternalServer& server,
const RequestContext& request,
int httpStatusCode,
const std::string& templateStr,
const std::string& pageTitleMsg,
const std::string& headingMsg)
: ContentResponseBlueprint(&server,
&request,
httpStatusCode,
"text/html; charset=utf-8",
templateStr)
RESOURCE::templates::error_html)
{
kainjow::mustache::list emptyList;
this->m_data = kainjow::mustache::object{
@ -122,7 +121,6 @@ HTTP404HtmlResponse::HTTP404HtmlResponse(const InternalServer& server,
: HTTPErrorHtmlResponse(server,
request,
MHD_HTTP_NOT_FOUND,
RESOURCE::templates::_404_html,
"Content not found",
"Not Found")
{

View File

@ -184,7 +184,6 @@ struct HTTPErrorHtmlResponse : ContentResponseBlueprint
HTTPErrorHtmlResponse(const InternalServer& server,
const RequestContext& request,
int httpStatusCode,
const std::string& templateStr,
const std::string& pageTitleMsg,
const std::string& headingMsg);

View File

@ -35,8 +35,8 @@ skin/block_external.js
skin/search_results.css
templates/search_result.html
templates/no_search_result.html
templates/error.html
templates/400.html
templates/404.html
templates/500.html
templates/index.html
templates/suggestion.json