mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 12:11:26 +00:00
feature(backups): set autobackup period from gql
This commit is contained in:
parent
d6609b29e8
commit
ff58bdccbb
|
@ -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