mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-18 00:19:15 +00:00
refactor(backups): repo init service method
This commit is contained in:
parent
a405eddbcf
commit
3f30469532
|
@ -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