feat: add initial notification support

* Add updated recipe notification

* Add recipe deleted notification

* Add notifications translations

* Shopping lists full c/u/d notifications

* Add categories c/u/d notifications

* Deal with None values in translation provider

* Add tag c/u/d notifications

* Add cookbook c/u/d notifications

* use single key pairs for consistency with frontend

* change dependency injection strategy

* use generic update messages

* use service to manage url generation server-side

* use new strategies for messages

* fix translator

Co-authored-by: Miroito <alban.vachette@gmail.com>
This commit is contained in:
Hayden
2022-05-21 10:23:55 -08:00
committed by GitHub
parent 841b560abc
commit b2066dfe72
12 changed files with 244 additions and 24 deletions

View File

@@ -19,8 +19,14 @@ class RegistrationController(BasePublicController):
if not settings.ALLOW_SIGNUP and data.group_token is None or data.group_token == "":
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN, detail=ErrorResponse.respond("User Registration is Disabled")
status_code=status.HTTP_403_FORBIDDEN,
detail=ErrorResponse.respond("User Registration is Disabled"),
)
registration_service = RegistrationService(self.deps.logger, get_repositories(self.deps.session), self.deps.t)
registration_service = RegistrationService(
self.deps.logger,
get_repositories(self.deps.session),
self.translator,
)
return registration_service.register_user(data)