feature(backups): get all snapshots if requested by api

pull/35/head
Houkime 2023-06-05 11:36:58 +00:00 committed by Inex Code
parent 550f7fa620
commit e3545d4541
1 changed files with 8 additions and 1 deletions

View File

@ -37,4 +37,11 @@ class Backup:
@strawberry.field
def all_snapshots(self) -> typing.List[SnapshotInfo]:
return []
result = []
snapshots = Backups.get_all_snapshots()
for snap in snapshots:
graphql_snap = SnapshotInfo(
id=snap.id, service=snap.service_name, created_at=snap.created_at
)
result.append(graphql_snap)
return result