mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-23 04:21:29 +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,
|
job,
|
||||||
[
|
[
|
||||||
FolderMoveNames(
|
FolderMoveNames(
|
||||||
name="bitwarden",
|
name=Bitwarden.get_foldername(folder),
|
||||||
bind_location=folder,
|
bind_location=folder,
|
||||||
group="vaultwarden",
|
group="vaultwarden",
|
||||||
owner="vaultwarden",
|
owner="vaultwarden",
|
||||||
|
|
|
@ -158,7 +158,7 @@ class Gitea(Service):
|
||||||
job,
|
job,
|
||||||
[
|
[
|
||||||
FolderMoveNames(
|
FolderMoveNames(
|
||||||
name="gitea",
|
name=Gitea.get_foldername(folder),
|
||||||
bind_location=folder,
|
bind_location=folder,
|
||||||
group="gitea",
|
group="gitea",
|
||||||
owner="gitea",
|
owner="gitea",
|
||||||
|
|
|
@ -140,6 +140,10 @@ class Service(ABC):
|
||||||
# def get_folders() -> str:
|
# def get_folders() -> str:
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_foldername(path: str) -> str:
|
||||||
|
return path.split("/")[-1]
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def move_to_volume(self, volume: BlockDevice) -> Job:
|
def move_to_volume(self, volume: BlockDevice) -> Job:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue