mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
refactor(backups): repo init service method
This commit is contained in:
parent
86e2b90bef
commit
bd744ba211
|
@ -46,6 +46,10 @@ class Backups(metaclass=SingletonMetaclass):
|
|||
self.provider.backuper.start_backup(folder, repo_name)
|
||||
service.post_restore()
|
||||
|
||||
def init_repo(self, service: Service):
|
||||
repo_name = service.get_id()
|
||||
self.provider.backuper.init(repo_name)
|
||||
|
||||
def get_snapshots(self, service: Service) -> List[Snapshot]:
|
||||
repo_name = service.get_id()
|
||||
|
||||
|
|
|
@ -16,3 +16,7 @@ class AbstractBackuper(ABC):
|
|||
def get_snapshots(self, repo_name) -> List[Snapshot]:
|
||||
"""Get all snapshots from the repo"""
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def init(self, repo_name):
|
||||
raise NotImplementedError
|
||||
|
|
Loading…
Reference in a new issue