From bb57f7f73e6eaf93f86ea6bbd1f3fb018923d00e Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 21 Jan 2025 21:47:01 -0500 Subject: [PATCH] Make the database keep a hash of ids to posts --- lib/DB.rakumod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/DB.rakumod b/lib/DB.rakumod index fd70f73..0085d70 100644 --- a/lib/DB.rakumod +++ b/lib/DB.rakumod @@ -41,6 +41,6 @@ class MarkdownPost does Post is json { #| The top level posts database class PostDB is json(:pretty) { - #| The inner list of posts - has Post:D @.posts = []; + #| A mapping from post ids to posts + has Hash[Int:D, Post:D] %.posts = %(); }