feature(backups): set autobackup period from gql

This commit is contained in:
Houkime 2023-06-05 11:49:37 +00:00
parent d6609b29e8
commit ff58bdccbb

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