Added events history
This commit is contained in:
@@ -96,7 +96,7 @@ class Sheerka(Concept):
|
||||
if self.sdp.first_time:
|
||||
self.sdp.set_key(self.USER_CONCEPTS_KEYS, 1000)
|
||||
|
||||
event = Event("Initializing Sheerka.")
|
||||
event = Event("Initializing Sheerka.", user=self.name)
|
||||
self.sdp.save_event(event)
|
||||
exec_context = ExecutionContext(self.key, event, self)
|
||||
|
||||
@@ -547,6 +547,11 @@ class Sheerka(Concept):
|
||||
|
||||
return sorted(res, key=lambda i: int(i.id))
|
||||
|
||||
def history(self, page=10, start=0):
|
||||
"""Gets the history of all commands"""
|
||||
return self.sdp.load_events(page, start)
|
||||
|
||||
|
||||
def test(self):
|
||||
return f"I have access to Sheerka !"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user