aboutsummaryrefslogtreecommitdiff
path: root/examples/template-demo/main.c
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-03-12 18:39:22 -0400
committerfrosty <gabriel@bwaaa.monster>2026-03-12 18:39:22 -0400
commitcaadb1627cbf393c919a6e0a57e5f42a03fa8c75 (patch)
tree28123bc175e85087ae0c59c2064e67d3215290c1 /examples/template-demo/main.c
parentad7ec71761e55b9a2800d6d1185059eae9bace37 (diff)
parent4722542caf4192fe702adc975e8ee557e3526426 (diff)
downloadbeaker-caadb1627cbf393c919a6e0a57e5f42a03fa8c75.tar.gz
Merge branch 'indev'
Diffstat (limited to 'examples/template-demo/main.c')
-rw-r--r--examples/template-demo/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/template-demo/main.c b/examples/template-demo/main.c
index 2adbb52..9989a68 100644
--- a/examples/template-demo/main.c
+++ b/examples/template-demo/main.c
@@ -26,6 +26,10 @@ int templating_handler(UrlParams *params) {
context_set(&ctx, "safe_html", "This is <b>bold</b> and <i>italic</i> HTML.");
context_set(&ctx, "unsafe_html", "<script>alert(0);");
+ context_set(&ctx, "user_logged_in", "true");
+ context_set(&ctx, "role", "admin");
+ context_set(&ctx, "status", "active");
+
char *features[] = {"Fast and Lightweight", "Simple API",
"Basic Routing", "Templating Engine",
"Static File Serving", "Cookie Management"};