mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
feature(backups): set autobackup period from gql
This commit is contained in:
parent
e3545d4541
commit
0b8f77e6f7
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue