feature(backups): drop repository call

This commit is contained in:
Houkime 2023-05-29 18:24:38 +00:00
parent c3696d3a4b
commit 9c4d2a0ba5

View file

@ -9,6 +9,7 @@ from selfprivacy_api.graphql.mutations.mutation_interface import (
MutationReturnInterface, MutationReturnInterface,
) )
from selfprivacy_api.graphql.queries.backup import BackupConfiguration from selfprivacy_api.graphql.queries.backup import BackupConfiguration
from selfprivacy_api.graphql.queries.backup import Backup
from selfprivacy_api.graphql.queries.providers import BackupProvider from selfprivacy_api.graphql.queries.providers import BackupProvider
from selfprivacy_api.backup import Backups from selfprivacy_api.backup import Backups
@ -51,3 +52,10 @@ class BackupMutations:
) )
Backups.set_provider(provider) Backups.set_provider(provider)
Backups.init_repo() Backups.init_repo()
@strawberry.mutation(permission_classes=[IsAuthenticated])
def remove_repository(self) -> GenericBackupConfigReturn:
"""Remove repository"""
Backups.reset()
return Backup.configuration()