fix(backups): fix output API return types for configuration

This commit is contained in:
Houkime 2023-06-16 14:39:00 +00:00
parent 8e1e37c766
commit 47aee3c1f1

View file

@ -74,7 +74,9 @@ class BackupMutations:
) -> GenericBackupConfigReturn: ) -> GenericBackupConfigReturn:
"""Set autobackup period. None is to disable autobackup""" """Set autobackup period. None is to disable autobackup"""
Backups.set_autobackup_period_minutes(period) Backups.set_autobackup_period_minutes(period)
return Backup.configuration() return GenericBackupConfigReturn(
success=True, message="", code="200", configuration=Backup().configuration()
)
@strawberry.mutation(permission_classes=[IsAuthenticated]) @strawberry.mutation(permission_classes=[IsAuthenticated])
def start_backup(self, service_id: str) -> GenericJobButationReturn: def start_backup(self, service_id: str) -> GenericJobButationReturn:
@ -127,4 +129,8 @@ class BackupMutations:
def force_snapshots_reload(self) -> GenericMutationReturn: def force_snapshots_reload(self) -> GenericMutationReturn:
"""Force snapshots reload""" """Force snapshots reload"""
Backups.force_snapshot_reload() Backups.force_snapshot_reload()
return GenericMutationReturn() return GenericMutationReturn(
success=True,
code=200,
message="",
)