refactor: webhook events (#1661)

* refactored EventBusService to work outside FastAPI

* extended event models

* refactored webhooks to run through event bus

* added basic webhook test route

* changed get_all to page_all

* fixed incorrectly implemented Vue variables

* fixed broken webhook test

* changed factory from staticmethod to classmethod

* made query boundary definitions easier to read
This commit is contained in:
Michael Genson 2022-09-27 21:55:20 -05:00 committed by GitHub
commit 796e55b7d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 175 additions and 54 deletions

View file

@ -122,7 +122,7 @@ class BaseCrudController(BaseUserController):
Base class for all CRUD controllers to facilitate common CRUD functions.
"""
event_bus: EventBusService = Depends(EventBusService)
event_bus: EventBusService = Depends(EventBusService.create)
def publish_event(self, event_type: EventTypes, document_data: EventDocumentDataBase, message: str = "") -> None:
self.event_bus.dispatch(