// LoadRecord populates action.Record func (action *AccountShowAction) LoadRecord() { action.LoadQuery() if action.Err != nil { return } action.Err = db.Get(action.Ctx, action.Query, &action.Record) }
// JSON is a method for actions.JSON func (action *TransactionShowAction) JSON() { query := action.Query() if action.Err != nil { return } action.Err = db.Get(action.Ctx, query, &action.Record) if action.Err != nil { return } hal.Render(action.W, NewTransactionResource(action.Record)) }
// JSON is a method for actions.JSON func (action *OperationShowAction) JSON() { query := action.Query() if action.Err != nil { return } action.Err = db.Get(action.Ctx, query, &action.Record) if action.Err != nil { return } r, err := NewOperationResource(action.Record) if err != nil { return } hal.Render(action.W, r) }