(c *gin.Context)
| 58 | } |
| 59 | |
| 60 | func proofQuery(c *gin.Context) { |
| 61 | req := ProofQueryRequest{} |
| 62 | if err := c.BindQuery(&req); err != nil { |
| 63 | errorResp(c, http.StatusBadRequest, xerrors.Errorf("Param error")) |
| 64 | return |
| 65 | } |
| 66 | if len(req.Identity) == 0 { |
| 67 | errorResp(c, http.StatusBadRequest, xerrors.Errorf("Param missing")) |
| 68 | return |
| 69 | } |
| 70 | req.Identity = strings.Split(req.Identity[0], ",") |
| 71 | |
| 72 | ids, pagination := performProofQuery(req) |
| 73 | c.JSON(http.StatusOK, ProofQueryResponse{ |
| 74 | Pagination: pagination, |
| 75 | IDs: ids, |
| 76 | }) |
| 77 | } |
| 78 | |
| 79 | func performProofQuery(req ProofQueryRequest) ([]ProofQueryResponseSingle, ProofQueryPaginationResponse) { |
| 80 | pagination := ProofQueryPaginationResponse{ |
nothing calls this directly
no test coverage detected