From 9c4d2a0ba517775cb335d8f8b933d1907e5ac3a2 Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Mon, 29 May 2023 18:24:38 +0000 Subject: [PATCH] feature(backups): drop repository call --- selfprivacy_api/graphql/mutations/backup_mutations.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/selfprivacy_api/graphql/mutations/backup_mutations.py b/selfprivacy_api/graphql/mutations/backup_mutations.py index 4b61f43..8bb2d94 100644 --- a/selfprivacy_api/graphql/mutations/backup_mutations.py +++ b/selfprivacy_api/graphql/mutations/backup_mutations.py @@ -9,6 +9,7 @@ from selfprivacy_api.graphql.mutations.mutation_interface import ( MutationReturnInterface, ) 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.backup import Backups @@ -51,3 +52,10 @@ class BackupMutations: ) Backups.set_provider(provider) Backups.init_repo() + + +@strawberry.mutation(permission_classes=[IsAuthenticated]) +def remove_repository(self) -> GenericBackupConfigReturn: + """Remove repository""" + Backups.reset() + return Backup.configuration()