mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-23 17:47:17 +01:00
Reimplemented UserSettingsWebPage.
This commit is contained in:
parent
a5a327ad35
commit
97dd727ee1
@ -14,25 +14,11 @@
|
||||
#include "modules/web/http/web_server_cookie.h"
|
||||
#include "modules/web/http/web_server_request.h"
|
||||
|
||||
void UserSettingsWebPage::_handle_request_main(Ref<WebServerRequest> request) {
|
||||
if (_web_permission.is_valid()) {
|
||||
if (_web_permission->activate(request)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
void UserSettingsWebPage::_render_index(Ref<WebServerRequest> request) {
|
||||
Ref<User> user = request->get_meta("user");
|
||||
|
||||
if (request->get_session().is_valid()) {
|
||||
Ref<User> u = request->get_meta("user");
|
||||
ERR_FAIL_COND(!user.is_valid());
|
||||
|
||||
if (u.is_valid()) {
|
||||
//handle_request(u, request);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UserSettingsWebPage::handle_settings_request(Ref<User> &user, Ref<WebServerRequest> request) {
|
||||
SettingsRequestData data;
|
||||
|
||||
if (request->get_method() == HTTPServerEnums::HTTP_METHOD_POST) {
|
||||
|
@ -15,8 +15,6 @@ class UserSettingsWebPage : public UserWebPage {
|
||||
GDCLASS(UserSettingsWebPage, UserWebPage);
|
||||
|
||||
public:
|
||||
void _handle_request_main(Ref<WebServerRequest> request);
|
||||
|
||||
struct SettingsRequestData {
|
||||
String error_str;
|
||||
|
||||
@ -26,7 +24,7 @@ public:
|
||||
String pass_check_val;
|
||||
};
|
||||
|
||||
virtual void handle_settings_request(Ref<User> &user, Ref<WebServerRequest> request);
|
||||
void _render_index(Ref<WebServerRequest> request);
|
||||
virtual void render_settings_request(Ref<User> &user, Ref<WebServerRequest> request, SettingsRequestData *data);
|
||||
|
||||
UserSettingsWebPage();
|
||||
|
Loading…
Reference in New Issue
Block a user