MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / GetBalanceLineage

Method GetBalanceLineage

api/balance.go:503–517  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

501}
502
503func (a Api) GetBalanceLineage(c *gin.Context) {
504 id, passed := c.Params.Get("id")
505 if !passed {
506 c.JSON(http.StatusBadRequest, gin.H{"error": "id is required. pass id in the route /:id"})
507 return
508 }
509
510 lineage, err := a.ledgerforge.GetBalanceLineage(c.Request.Context(), id)
511 if err != nil {
512 c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
513 return
514 }
515
516 c.JSON(http.StatusOK, lineage)
517}

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected