feat(workflow): example covers security, platform, enterprise and resilience features
105 route tests, matrix crawl, spec and README updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,8 @@ namespace {
|
||||
|
||||
const char* kFeatures[][2] = {
|
||||
{"routing", "/routing/hello/world"},
|
||||
{"views", "/views/greet"},
|
||||
{"routers", "/routers/nested/deep"},
|
||||
{"views", "/routing/views/greet"},
|
||||
{"routers", "/routing/routers/nested/deep"},
|
||||
{"chaining", "/app1/app1/app1/whoami"},
|
||||
{"orm-sqlite", "/orm/users?backend=sqlite"},
|
||||
{"orm-postgres", "/orm/users?backend=postgres"},
|
||||
@@ -50,9 +50,10 @@ const char* kFeatures[][2] = {
|
||||
|
||||
} // namespace
|
||||
|
||||
void register_index(fw::Router& router, Services& services) {
|
||||
fw::Environment* env = services.templates.get();
|
||||
router.get("/", "index", [env](fw::Request req) {
|
||||
void register_index(fw::Router& router, Services& services_ref) {
|
||||
fw::Environment* env = services_ref.templates.get();
|
||||
Services* services = &services_ref;
|
||||
router.get("/", "index", [env, services](fw::Request req) {
|
||||
fw::TemplateCtx ctx;
|
||||
ctx["title"] = std::string("MoloApp living example");
|
||||
ctx["show_matrix"] = std::string("true");
|
||||
@@ -60,6 +61,9 @@ void register_index(fw::Router& router, Services& services) {
|
||||
for (const auto& [feature, route] : kFeatures) {
|
||||
rows.push_back({{"feature", feature}, {"route", route}});
|
||||
}
|
||||
for (const auto& [feature, route] : services->features) {
|
||||
rows.push_back({{"feature", feature}, {"route", route}});
|
||||
}
|
||||
ctx["matrix"] = rows;
|
||||
(void)req;
|
||||
return fw::Response(200, env->render("index.html", ctx),
|
||||
|
||||
Reference in New Issue
Block a user