mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-04 18:53:10 +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()
|
Backups.reset()
|
||||||
return Backup.configuration()
|
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])
|
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
||||||
def start_backup(
|
def start_backup(
|
||||||
self, service_id: typing.Optional[str] = None
|
self, service_id: typing.Optional[str] = None
|
||||||
|
|
Loading…
Reference in a new issue