Paged Article now also inherits from WebNode.

This commit is contained in:
Relintai 2022-01-08 12:53:50 +01:00
parent c6c9caed36
commit 4cbea7fd06
3 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@
#include <tinydir/tinydir.h>
#include <iostream>
void PagedArticle::index(Request *request) {
void PagedArticle::handle_request_main(Request *request) {
const String r = request->get_current_path_segment();
Article *s = pages[r];
@ -222,7 +222,7 @@ void PagedArticle::generate_summary(Article *article) {
}
PagedArticle::PagedArticle() :
Object() {
WebNode() {
}
PagedArticle::~PagedArticle() {

View File

@ -6,7 +6,7 @@
#include "core/string.h"
#include "core/file_cache.h"
#include "core/object.h"
#include "core/http/web_node.h"
#include "core/http/request.h"
@ -30,11 +30,11 @@ struct Article {
}
};
class PagedArticle : public Object {
RCPP_OBJECT(PagedArticle, Object);
class PagedArticle : public WebNode {
RCPP_OBJECT(PagedArticle, WebNode);
public:
void index(Request *request);
void handle_request_main(Request *request);
void load();
Article *load_folder(const String &folder, const String &path);

View File

@ -18,7 +18,7 @@ void PagedList::index(Request *request) {
return;
}
articles->index(request);
articles->handle_request_main(request);
}
void PagedList::load() {