MessagePage now also inherits from WebNode.

This commit is contained in:
Relintai 2022-01-08 12:52:52 +01:00
parent f7cbad2e96
commit c6c9caed36
2 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
#include "core/database/table_builder.h"
#include "core/database/query_result.h"
void MessagePage::index(Request *request) {
void MessagePage::handle_request_main(Request *request) {
Ref<QueryBuilder> b = db->get_query_builder();
b->select("text")->from("message_page")->end_command();
@ -69,7 +69,7 @@ void MessagePage::migrate() {
}
MessagePage::MessagePage() :
Object() {
WebNode() {
messages.push_back("T message 1");
messages.push_back("T message 2");
}

View File

@ -4,16 +4,16 @@
#include "core/containers/vector.h"
#include "core/string.h"
#include "core/object.h"
#include "core/http/web_node.h"
#include "core/http/request.h"
class MessagePage : public Object {
RCPP_OBJECT(MessagePage, Object);
class MessagePage : public WebNode {
RCPP_OBJECT(MessagePage, WebNode);
public:
void index(Request *request);
void handle_request_main(Request *request);
void migrate();