Develop #22
|
@ -17,15 +17,15 @@ func GetSupplier() Supplier {
|
|||
return Supplier{}
|
||||
}
|
||||
|
||||
func (s Supplier) GetListSupplierInfo(p model.GetSupplierRequest) (*model.ResponseSupplierInfo, error) {
|
||||
func (s Supplier) GetListSupplierInfo(p model.GetSupplierRequest) ([]*model.ResponseSupplierInfo, error) {
|
||||
msg, err := natsio.GetServer().Request(subject.Supplier.GetListSupplierInfo, toBytes(p))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var r struct {
|
||||
Data *model.ResponseSupplierInfo `json:"data"`
|
||||
Error string `json:"error"`
|
||||
Data []*model.ResponseSupplierInfo `json:"data"`
|
||||
Error string `json:"error"`
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(msg.Data, &r); err != nil {
|
||||
|
|
Loading…
Reference in New Issue