refactor-location #134
|
@ -276,7 +276,7 @@ func (s Supplier) DeleteCashflow(p model.SupplierDeleteCashflowReq) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckTokenSupplier ...
|
// CheckTokenSupplier ...
|
||||||
func (s Supplier) CheckTokenSupplier(p model.CheckTokenSupplierPayload) (*model.ResponseSupplierInfo, error) {
|
func (s Supplier) CheckTokenSupplier(p model.CheckTokenSupplierPayload) (*model.ResponseCheckTokenSupplier, error) {
|
||||||
msg, err := natsio.GetServer().Request(subject.Supplier.CheckTokenSupplier, toBytes(p))
|
msg, err := natsio.GetServer().Request(subject.Supplier.CheckTokenSupplier, toBytes(p))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -284,7 +284,7 @@ func (s Supplier) CheckTokenSupplier(p model.CheckTokenSupplierPayload) (*model.
|
||||||
|
|
||||||
var r struct {
|
var r struct {
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
Data *model.ResponseSupplierInfo `json:"data"`
|
Data *model.ResponseCheckTokenSupplier `json:"data"`
|
||||||
}
|
}
|
||||||
if err = json.Unmarshal(msg.Data, &r); err != nil {
|
if err = json.Unmarshal(msg.Data, &r); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -84,3 +84,10 @@ type SyncSupplierWarehousePayload struct {
|
||||||
type SupplierCountRes struct {
|
type SupplierCountRes struct {
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResponseCheckTokenSupplier ...
|
||||||
|
type ResponseCheckTokenSupplier struct {
|
||||||
|
Invalid bool `json:"invalid"`
|
||||||
|
Reason string `json:"reason"`
|
||||||
|
Supplier ResponseSupplierInfo `json:"supplier"`
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue