Skip to content

Commit

Permalink
add verified state in list api
Browse files Browse the repository at this point in the history
  • Loading branch information
Leechael committed Dec 17, 2024
1 parent d05f541 commit f381166
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcap-attestation/src/dcap_attestation/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async def recent(db: Session = Depends(get_db), skip: int = 0, limit: int = 20):
rows = crud.get_quotes(db, skip, limit)
return JSONResponse(content=[{
"checksum": row.checksum,
"verified": row.verified,
"created_at": row.created_at.isoformat(),
} for row in rows])

Expand All @@ -49,7 +50,7 @@ async def view(checksum: str, db: Session = Depends(get_db)):
if not row:
raise HTTPException(status_code=404, detail="Not found")
d = row.to_instance().dict()
d['uploaded_at'] = row.created_at.isoformat()
d['uploaded_at'] = row.created_at.isoformat
d['checksum'] = row.checksum
d['can_download'] = row.has_raw_quote
return JSONResponse(content=d)
Expand Down

0 comments on commit f381166

Please # to comment.