mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 11:04:25 -04:00
Refactoring: fix mixed indentation and add curly braces in comic.cpp
This commit is contained in:
26
YACReaderLibrary/server/controllers/errorcontroller.cpp
Normal file
26
YACReaderLibrary/server/controllers/errorcontroller.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "errorcontroller.h"
|
||||
|
||||
#include "template.h"
|
||||
#include "../static.h"
|
||||
|
||||
|
||||
ErrorController::ErrorController(int errorCode)
|
||||
:error(errorCode)
|
||||
{}
|
||||
|
||||
void ErrorController::service(HttpRequest& request, HttpResponse& response)
|
||||
{
|
||||
Q_UNUSED(request)
|
||||
switch(error)
|
||||
{
|
||||
case 300:
|
||||
response.setStatus(300,"redirect");
|
||||
response.write("<html> <head> <meta http-equiv=\"refresh\" content=\"0; URL=/\"> </head> <body> </body> </html>", true);
|
||||
break;
|
||||
case 404:
|
||||
response.setStatus(404,"not found");
|
||||
response.write("404 not found",true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user