comparison page-index.c @ 82:0a29424e4486

pasterd: use constant filenames
author David Demelier <markand@malikania.fr>
date Fri, 17 Mar 2023 19:45:00 +0100
parents 1ffe2f5a8500
children 94dcca86e5cc
comparison
equal deleted inserted replaced
81:1ffe2f5a8500 82:0a29424e4486
23 #include "page-status.h" 23 #include "page-status.h"
24 #include "page.h" 24 #include "page.h"
25 #include "paste.h" 25 #include "paste.h"
26 #include "util.h" 26 #include "util.h"
27 27
28 #define LIMIT 16 28 #define TITLE "paster -- recent pastes"
29 #define TITLE "paster -- recent pastes" 29 #define HTML "index.html"
30 #define LIMIT 16
30 31
31 struct page { 32 struct page {
32 struct kreq *req; 33 struct kreq *req;
33 struct ktemplate template; 34 struct ktemplate template;
34 const struct paste *pastes; 35 const struct paste *pastes;
131 }, 132 },
132 .pastes = pastes, 133 .pastes = pastes,
133 .pastesz = pastesz 134 .pastesz = pastesz
134 }; 135 };
135 136
136 page(req, KHTTP_200, TITLE, "index.html", &self.template); 137 page(req, KHTTP_200, TITLE, HTML, &self.template);
137 } 138 }
138 139
139 void 140 void
140 page_index(struct kreq *req) 141 page_index(struct kreq *req)
141 { 142 {