mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
fix(services): use get_foldername() for moving around
This commit is contained in:
parent
1c0e3f0f92
commit
0207b5a473
|
@ -160,7 +160,7 @@ class Bitwarden(Service):
|
|||
job,
|
||||
[
|
||||
FolderMoveNames(
|
||||
name="bitwarden",
|
||||
name=Bitwarden.get_foldername(folder),
|
||||
bind_location=folder,
|
||||
group="vaultwarden",
|
||||
owner="vaultwarden",
|
||||
|
|
|
@ -158,7 +158,7 @@ class Gitea(Service):
|
|||
job,
|
||||
[
|
||||
FolderMoveNames(
|
||||
name="gitea",
|
||||
name=Gitea.get_foldername(folder),
|
||||
bind_location=folder,
|
||||
group="gitea",
|
||||
owner="gitea",
|
||||
|
|
|
@ -140,6 +140,10 @@ class Service(ABC):
|
|||
# def get_folders() -> str:
|
||||
# pass
|
||||
|
||||
@staticmethod
|
||||
def get_foldername(path: str) -> str:
|
||||
return path.split("/")[-1]
|
||||
|
||||
@abstractmethod
|
||||
def move_to_volume(self, volume: BlockDevice) -> Job:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue