MCPcopy Create free account
hub / github.com/NextDotID/proof_server / proofQuery

Function proofQuery

controller/proof_query.go:60–77  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

58}
59
60func 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
79func performProofQuery(req ProofQueryRequest) ([]ProofQueryResponseSingle, ProofQueryPaginationResponse) {
80 pagination := ProofQueryPaginationResponse{

Callers

nothing calls this directly

Calls 2

performProofQueryFunction · 0.85
errorRespFunction · 0.70

Tested by

no test coverage detected