mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 15:49:29 +00:00
feat: Add inital page to add random Haiku to starpage
Refs: OPS-62
This commit is contained in:
parent
f4b1922ed7
commit
d9044ff53e
3 changed files with 40 additions and 2 deletions
|
|
@ -175,6 +175,15 @@ class StoreManager:
|
|||
"""
|
||||
return self._save(data.__dict__)
|
||||
|
||||
def count_entries(self) -> int:
|
||||
"""
|
||||
Query the store how many Haikus are stored.
|
||||
|
||||
:return: Number of stored haikus.
|
||||
:rtype: int
|
||||
"""
|
||||
return len(self._db.all())
|
||||
|
||||
def get_id_of_latest_haiku(self) -> Optional[int]:
|
||||
"""
|
||||
Get the ID of the most recently added haiku.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue