diff --git a/selfprivacy_api/services/forgejo/__init__.py b/selfprivacy_api/services/forgejo/__init__.py index ddea493..ff6d12c 100644 --- a/selfprivacy_api/services/forgejo/__init__.py +++ b/selfprivacy_api/services/forgejo/__init__.py @@ -94,10 +94,15 @@ class Forgejo(Service): def get_url(cls) -> Optional[str]: """Return service url.""" domain = get_domain() - return f"https://git.{domain}" + subdomain = cls.get_subdomain() + return f"https://{subdomain}.{domain}" @classmethod def get_subdomain(cls) -> Optional[str]: + with ReadUserData() as data: + if "gitea" in data["modules"]: + return data["modules"]["gitea"]["subdomain"] + return "git" @staticmethod