From 320c5d4ba6cbe784d0c0f211c898cf051a5228b3 Mon Sep 17 00:00:00 2001
From: Toni Uhlig <matzeton@googlemail.com>
Date: Sun, 31 Oct 2021 00:39:43 +0200
Subject: Format createDate and publishDate with std::strftime().

 * Disallow access to any blog entry individually.

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
---
 wwwroot/blog/index.html                    | 2 +-
 wwwroot/blog/my-second-blog-entry.json     | 3 ++-
 wwwroot/blog/my-third-blog-entry.json      | 3 ++-
 wwwroot/blog/my-very-first-blog-entry.json | 3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)

(limited to 'wwwroot')

diff --git a/wwwroot/blog/index.html b/wwwroot/blog/index.html
index 9198152..a4c520a 100644
--- a/wwwroot/blog/index.html
+++ b/wwwroot/blog/index.html
@@ -3,7 +3,7 @@
 <b>blabla</b>
 Test fn....: <b>{{ test_fn }}</b><br>
 Test RetFN.: <b>{{ test_return_true }}</b><br><br><br>
-{% if exists("blog_listing") and length(blog_listing) > 0 %}
+{% if exists("blog_listing") %}
 <table>
 ## for entry in blog_listing
     <tr>
diff --git a/wwwroot/blog/my-second-blog-entry.json b/wwwroot/blog/my-second-blog-entry.json
index ecb2b8b..c1a4fe6 100644
--- a/wwwroot/blog/my-second-blog-entry.json
+++ b/wwwroot/blog/my-second-blog-entry.json
@@ -4,5 +4,6 @@
     "author": "lns",
     "createDate": "23.02.1989 23:59",
     "publishDate": "30.12.2020 1:00",
-    "published": true
+    "published": true,
+    "accessAllowed": false
 }
diff --git a/wwwroot/blog/my-third-blog-entry.json b/wwwroot/blog/my-third-blog-entry.json
index 9682cd2..3478508 100644
--- a/wwwroot/blog/my-third-blog-entry.json
+++ b/wwwroot/blog/my-third-blog-entry.json
@@ -4,5 +4,6 @@
     "author": "lns",
     "createDate": "24.02.1989 23:59",
     "publishDate": "31.12.2020 1:00",
-    "published": false
+    "published": false,
+    "accessAllowed": false
 }
diff --git a/wwwroot/blog/my-very-first-blog-entry.json b/wwwroot/blog/my-very-first-blog-entry.json
index 52f52f7..e10fb2c 100644
--- a/wwwroot/blog/my-very-first-blog-entry.json
+++ b/wwwroot/blog/my-very-first-blog-entry.json
@@ -4,5 +4,6 @@
     "author": "lns",
     "createDate": "22.02.1989 23:59",
     "publishDate": "31.12.2020 1:00",
-    "published": true
+    "published": true,
+    "accessAllowed": true
 }
-- 
cgit v1.2.3