mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-05 23:54:19 +00:00
feature(backups): get all snapshots if requested by api
This commit is contained in:
parent
2168037a10
commit
d6609b29e8
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue