Make the database keep a hash of ids to posts
This commit is contained in:
parent
99f0625905
commit
bb57f7f73e
1 changed files with 2 additions and 2 deletions
|
@ -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 = %();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue