From 1fd5db9ff3e277c9ad5be245cf0bab8be59bda5d Mon Sep 17 00:00:00 2001 From: Houkime <> Date: Fri, 16 Jun 2023 14:39:00 +0000 Subject: [PATCH] fix(backups): fix output API return types for configuration --- selfprivacy_api/graphql/mutations/backup_mutations.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/selfprivacy_api/graphql/mutations/backup_mutations.py b/selfprivacy_api/graphql/mutations/backup_mutations.py index 110e731..1488a2c 100644 --- a/selfprivacy_api/graphql/mutations/backup_mutations.py +++ b/selfprivacy_api/graphql/mutations/backup_mutations.py @@ -74,7 +74,9 @@ class BackupMutations: ) -> GenericBackupConfigReturn: """Set autobackup period. None is to disable autobackup""" Backups.set_autobackup_period_minutes(period) - return Backup.configuration() + return GenericBackupConfigReturn( + success=True, message="", code="200", configuration=Backup().configuration() + ) @strawberry.mutation(permission_classes=[IsAuthenticated]) def start_backup(self, service_id: str) -> GenericJobButationReturn: @@ -127,4 +129,8 @@ class BackupMutations: def force_snapshots_reload(self) -> GenericMutationReturn: """Force snapshots reload""" Backups.force_snapshot_reload() - return GenericMutationReturn() + return GenericMutationReturn( + success=True, + code=200, + message="", + )