GetLedgerByID retrieves a ledger by its ID from the datasource. It returns a pointer to the Ledger model and an error if the operation fails. Parameters: - id: A string representing the ID of the ledger to retrieve. Returns: - *model.Ledger: A pointer to the Ledger model if found. - error: An erro
(id string)
| 119 | // - *model.Ledger: A pointer to the Ledger model if found. |
| 120 | // - error: An error if the ledger could not be retrieved. |
| 121 | func (l *LedgerForge) GetLedgerByID(id string) (*model.Ledger, error) { |
| 122 | return l.datasource.GetLedgerByID(id) |
| 123 | } |
| 124 | |
| 125 | // UpdateLedger updates an existing ledger's name. |
| 126 | // It calls postLedgerActions after a successful update to handle indexing and webhooks. |