feature(backups): set autobackup period from gql

This commit is contained in:
Houkime 2023-06-05 11:49:37 +00:00 committed by Inex Code
parent e3545d4541
commit 0b8f77e6f7

View file

@ -65,6 +65,14 @@ class BackupMutations:
Backups.reset()
return Backup.configuration()
@strawberry.mutation(permission_classes=[IsAuthenticated])
def set_autobackup_period(
self, period: typing.Optional[int] = None
) -> GenericBackupConfigReturn:
"""Set autobackup period. None is to disable autobackup"""
Backups.set_autobackup_period_minutes(period)
return Backup.configuration()
@strawberry.mutation(permission_classes=[IsAuthenticated])
def start_backup(
self, service_id: typing.Optional[str] = None