♻️(dimail) refacto setup_dimail_db to call dimail client

Management command "setup_dimail_db" called dimail directly, thus
creating duplicated code. It now calls "create_domain" and "create_allow"
methods from DimailAPIClient (create_user is left unchanged to create
special users such as dimail admin or people)
This commit is contained in:
Marie PUPO JEAMMET
2025-03-19 18:59:30 +01:00
committed by Marie
parent 28fdee868d
commit 8cbedeb76e
4 changed files with 43 additions and 55 deletions

View File

@@ -296,7 +296,7 @@ recreate-dimail-container:
dimail-setup-db:
@echo "$(BOLD)Populating database of local dimail API container$(RESET)"
@$(MANAGE) setup_dimail_db
@$(MANAGE) setup_dimail_db --populate-from-people
.PHONY: dimail-setup-db
# -- Mail generator