diff --git a/app/api/views/custom_domain.py b/app/api/views/custom_domain.py index 98bfe5bd..ae1873a7 100644 --- a/app/api/views/custom_domain.py +++ b/app/api/views/custom_domain.py @@ -10,6 +10,7 @@ def custom_domain_to_dict(custom_domain: CustomDomain): "id": custom_domain.id, "domain": custom_domain.domain, "verified": custom_domain.verified, + "nb_alias": custom_domain.nb_alias(), } diff --git a/docs/api.md b/docs/api.md index 69a29ec8..b9c38ba9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -639,11 +639,13 @@ List of custom domains. { "domain": "test1.org", "id": 1, + "nb_alias": 0, "verified": true }, { "domain": "test2.org", "id": 2, + "nb_alias": 0, "verified": false } ] diff --git a/tests/api/test_custom_domain.py b/tests/api/test_custom_domain.py index 1a4cf680..a254544e 100644 --- a/tests/api/test_custom_domain.py +++ b/tests/api/test_custom_domain.py @@ -19,7 +19,7 @@ def test_get_custom_domains(flask_client): assert r.status_code == 200 assert r.json == { "custom_domains": [ - {"domain": "test1.org", "id": 1, "verified": True}, - {"domain": "test2.org", "id": 2, "verified": False}, + {"domain": "test1.org", "id": 1, "nb_alias": 0, "verified": True}, + {"domain": "test2.org", "id": 2, "nb_alias": 0, "verified": False}, ] }