diff --git a/client/supplier.go b/client/supplier.go index c41d843..41a1849 100644 --- a/client/supplier.go +++ b/client/supplier.go @@ -80,27 +80,6 @@ func (s Supplier) FindAll(supplierID model.SupplierRequestPayload) (*model.Suppl return r.Data, nil } -func (s Supplier) GetBankInfoByID(supplierID model.SupplierRequestPayload) (*model.SupplierAll, error) { - msg, err := natsio.GetServer().Request(subject.Supplier.FindAll, toBytes(supplierID)) - if err != nil { - return nil, err - } - - var r struct { - Data *model.SupplierAll `json:"data"` - Error string `json:"error"` - } - - if err = json.Unmarshal(msg.Data, &r); err != nil { - return nil, err - } - if r.Error != "" { - return nil, errors.New(r.Error) - } - - return r.Data, nil -} - // CreateWarehouseIntoServiceSupplier ... func (s Supplier) CreateWarehouseIntoServiceSupplier(p model.CreateSupplierWarehousePayload) error { msg, err := natsio.GetServer().Request(subject.Warehouse.CreateWarehouseIntoServiceSupplier, toBytes(p)) diff --git a/subject/bank.go b/subject/bank.go index f6e8d67..a991d5d 100644 --- a/subject/bank.go +++ b/subject/bank.go @@ -10,5 +10,6 @@ var Bank = struct { GetBankById string GetBankBranchById string }{ - GetBankBranchById: getBankValue("get_bank_by_id"), + GetBankById: getBankValue("get_bank_by_id"), + GetBankBranchById: getBankValue("get_bank_branch_by_id"), }