feature(backups): get all snapshots if requested by api
This commit is contained in:
parent
550f7fa620
commit
e3545d4541
|
@ -37,4 +37,11 @@ class Backup:
|
||||||
|
|
||||||
@strawberry.field
|
@strawberry.field
|
||||||
def all_snapshots(self) -> typing.List[SnapshotInfo]:
|
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
|
||||||
|
|
Loading…
Reference in New Issue