ListPage now inherits from WebNode.

This commit is contained in:
Relintai 2022-01-08 12:52:03 +01:00
parent 3809ca5a38
commit f7cbad2e96
3 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@
#include <tinydir/tinydir.h>
#include <iostream>
void ListPage::index(Request *request) {
void ListPage::handle_request_main(Request *request) {
String r = "";
for (uint32_t i = 0; i < list_entries.size(); ++i) {
@ -80,7 +80,7 @@ void ListPage::load() {
}
ListPage::ListPage() :
Object() {
WebNode() {
}
ListPage::~ListPage() {

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 ListPage : public Object {
RCPP_OBJECT(ListPage, Object);
class ListPage : public WebNode {
RCPP_OBJECT(ListPage, WebNode);
public:
void index(Request *request);
void handle_request_main(Request *request);
void load();

View File

@ -14,7 +14,7 @@ void PagedList::index(Request *request) {
const String path = request->get_current_path_segment();
if (request->get_remaining_segment_count() == 0) {
main_page->index(request);
main_page->handle_request_main(request);
return;
}