mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-03-18 20:39:46 +00:00
fix: remove get sub domain from services
This commit is contained in:
parent
2b9b81890b
commit
9125d03b35
7 changed files with 7 additions and 28 deletions
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Bitwarden service"""
|
"""Class representing Bitwarden service"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
@ -43,10 +44,6 @@ class Bitwarden(Service):
|
||||||
domain = get_domain()
|
domain = get_domain()
|
||||||
return f"https://password.{domain}"
|
return f"https://password.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> Optional[str]:
|
|
||||||
return "password"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Bitwarden service"""
|
"""Class representing Bitwarden service"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
@ -39,10 +40,6 @@ class Gitea(Service):
|
||||||
domain = get_domain()
|
domain = get_domain()
|
||||||
return f"https://git.{domain}"
|
return f"https://git.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> Optional[str]:
|
|
||||||
return "git"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Jitsi Meet service"""
|
"""Class representing Jitsi Meet service"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
@ -42,10 +43,6 @@ class JitsiMeet(Service):
|
||||||
domain = get_domain()
|
domain = get_domain()
|
||||||
return f"https://meet.{domain}"
|
return f"https://meet.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> Optional[str]:
|
|
||||||
return "meet"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Nextcloud service."""
|
"""Class representing Nextcloud service."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
@ -41,10 +42,6 @@ class Nextcloud(Service):
|
||||||
domain = get_domain()
|
domain = get_domain()
|
||||||
return f"https://cloud.{domain}"
|
return f"https://cloud.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> Optional[str]:
|
|
||||||
return "cloud"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing ocserv service."""
|
"""Class representing ocserv service."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
import typing
|
import typing
|
||||||
|
@ -33,10 +34,6 @@ class Ocserv(Service):
|
||||||
"""Return service url."""
|
"""Return service url."""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> typing.Optional[str]:
|
|
||||||
return "vpn"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Nextcloud service."""
|
"""Class representing Nextcloud service."""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
@ -37,10 +38,6 @@ class Pleroma(Service):
|
||||||
domain = get_domain()
|
domain = get_domain()
|
||||||
return f"https://social.{domain}"
|
return f"https://social.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> Optional[str]:
|
|
||||||
return "social"
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_movable() -> bool:
|
def is_movable() -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Class representing Bitwarden service"""
|
"""Class representing Bitwarden service"""
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import typing
|
import typing
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -63,10 +64,6 @@ class DummyService(Service):
|
||||||
domain = "test.com"
|
domain = "test.com"
|
||||||
return f"https://password.{domain}"
|
return f"https://password.{domain}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_subdomain() -> typing.Optional[str]:
|
|
||||||
return "password"
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_movable(cls) -> bool:
|
def is_movable(cls) -> bool:
|
||||||
return cls.movable
|
return cls.movable
|
||||||
|
|
Loading…
Add table
Reference in a new issue