Make the database keep a hash of ids to posts

This commit is contained in:
Nathan McCarty 2025-01-21 21:47:01 -05:00
parent 99f0625905
commit bb57f7f73e

View file

@ -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 = %();
}