Redirect to / on login success.

This commit is contained in:
Relintai 2021-10-31 10:28:19 +01:00
parent c19a796782
commit 8472e10d23
3 changed files with 8 additions and 1 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"master": "4aa9a28ed5ee2ba039c8f0f97575194742951d48"}}
{"engine": {"master": "f883b4d678a57303a1267468abaf0468cc76d7e1"}}

View File

@ -114,6 +114,12 @@ void MourneUserController::render_register_request_default(Request *request, Reg
request->compile_and_send_body();
}
void MourneUserController::render_login_success(Request *request) {
request->body = "Login Success!<br>";
request->send_redirect("/");
}
void MourneUserController::render_already_logged_in_error(Request *request) {
request->body += "You are already logged in.";

View File

@ -14,6 +14,7 @@ class MourneUserController : public UserController {
public:
void render_login_request_default(Request *request, LoginRequestData *data);
void render_register_request_default(Request *request, RegisterRequestData *data);
void render_login_success(Request *request);
void render_already_logged_in_error(Request *request);
void render_settings_request(Ref<User> &user, Request *request, SettingsRequestData *data);