| 493 | } |
| 494 | |
| 495 | func (a Api) GetTransactionLineage(c *gin.Context) { |
| 496 | id, passed := c.Params.Get("id") |
| 497 | if !passed { |
| 498 | c.JSON(http.StatusBadRequest, gin.H{"error": "id is required. pass id in the route /:id"}) |
| 499 | return |
| 500 | } |
| 501 | |
| 502 | lineage, err := a.ledgerforge.GetTransactionLineage(c.Request.Context(), id) |
| 503 | if err != nil { |
| 504 | c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) |
| 505 | return |
| 506 | } |
| 507 | |
| 508 | c.JSON(http.StatusOK, lineage) |
| 509 | } |
| 510 | |
| 511 | // RecoverQueuedTransactions triggers manual recovery of stuck queued transactions. |
| 512 | // Accepts an optional "threshold" query parameter (e.g. "5m", "10m") specifying |