mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
ListPage now inherits from WebNode.
This commit is contained in:
parent
3809ca5a38
commit
f7cbad2e96
@ -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() {
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user