mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 20:11:30 +00:00
fix(backups): fix output API return types for configuration
This commit is contained in:
parent
5d95c1b44e
commit
1fd5db9ff3
|
@ -74,7 +74,9 @@ class BackupMutations:
|
||||||
) -> GenericBackupConfigReturn:
|
) -> GenericBackupConfigReturn:
|
||||||
"""Set autobackup period. None is to disable autobackup"""
|
"""Set autobackup period. None is to disable autobackup"""
|
||||||
Backups.set_autobackup_period_minutes(period)
|
Backups.set_autobackup_period_minutes(period)
|
||||||
return Backup.configuration()
|
return GenericBackupConfigReturn(
|
||||||
|
success=True, message="", code="200", configuration=Backup().configuration()
|
||||||
|
)
|
||||||
|
|
||||||
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
@strawberry.mutation(permission_classes=[IsAuthenticated])
|
||||||
def start_backup(self, service_id: str) -> GenericJobButationReturn:
|
def start_backup(self, service_id: str) -> GenericJobButationReturn:
|
||||||
|
@ -127,4 +129,8 @@ class BackupMutations:
|
||||||
def force_snapshots_reload(self) -> GenericMutationReturn:
|
def force_snapshots_reload(self) -> GenericMutationReturn:
|
||||||
"""Force snapshots reload"""
|
"""Force snapshots reload"""
|
||||||
Backups.force_snapshot_reload()
|
Backups.force_snapshot_reload()
|
||||||
return GenericMutationReturn()
|
return GenericMutationReturn(
|
||||||
|
success=True,
|
||||||
|
code=200,
|
||||||
|
message="",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue