Compare commits

..

No commits in common. "a62eeb60d201fb92132fae287588da62c2d503a1" and "f58dfd42910fd18f710d12a601f6ade087342a95" have entirely different histories.

3 changed files with 6 additions and 13 deletions

View File

@ -203,9 +203,9 @@ func (w Warehouse) UpdateStatusWarehousePendingInactive(p model.UpdateStatusWare
return nil return nil
} }
// UpdateIsSellyMall ... // MigrationSellyMall ...
func (w Warehouse) UpdateIsSellyMall(p model.UpdateIsSellyMallRequest) error { func (w Warehouse) MigrationSellyMall() error {
msg, err := natsio.GetServer().Request(subject.Warehouse.UpdateIsSellyMall, toBytes(p)) _, err := natsio.GetServer().Request(subject.Warehouse.MigrationIsSellyMall, toBytes(""))
if err != nil { if err != nil {
return err return err
} }
@ -214,11 +214,9 @@ func (w Warehouse) UpdateIsSellyMall(p model.UpdateIsSellyMallRequest) error {
Error string `json:"error"` Error string `json:"error"`
} }
if err = json.Unmarshal(msg.Data, &r); err != nil {
return fmt.Errorf("nats: update_is_selly_mall %v", err)
}
if r.Error != "" { if r.Error != "" {
return errors.New(r.Error) return errors.New(r.Error)
} }
return nil return nil
} }

View File

@ -120,11 +120,6 @@ type UpdateStatusWarehousePendingInactiveRequest struct {
Warehouses []UpdateStatusWarehousePendingInactive `json:"warehouses"` Warehouses []UpdateStatusWarehousePendingInactive `json:"warehouses"`
} }
// UpdateIsSellyMallRequest ...
type UpdateIsSellyMallRequest struct {
SupplierID string `json:"supplier"`
}
// UpdateStatusWarehousePendingInactive ... // UpdateStatusWarehousePendingInactive ...
type UpdateStatusWarehousePendingInactive struct { type UpdateStatusWarehousePendingInactive struct {
WarehouseID string `json:"warehouse"` WarehouseID string `json:"warehouse"`

View File

@ -29,7 +29,7 @@ var Warehouse = struct {
GetWarehouses string GetWarehouses string
UpdateORDeliveryStatus string UpdateORDeliveryStatus string
UpdateStatusWarehousePendingInactive string UpdateStatusWarehousePendingInactive string
UpdateIsSellyMall string MigrationIsSellyMall string
}{ }{
CreateWarehouseIntoServiceSupplier: getWarehouseValue("create_warehouse_into_service_supplier"), CreateWarehouseIntoServiceSupplier: getWarehouseValue("create_warehouse_into_service_supplier"),
UpdateWarehouseIntoServiceSupplier: getWarehouseValue("update_warehouse_into_service_supplier"), UpdateWarehouseIntoServiceSupplier: getWarehouseValue("update_warehouse_into_service_supplier"),
@ -51,5 +51,5 @@ var Warehouse = struct {
GetWarehouses: getWarehouseValue("get_warehouses"), GetWarehouses: getWarehouseValue("get_warehouses"),
UpdateORDeliveryStatus: getWarehouseValue("update_or_delivery_status"), UpdateORDeliveryStatus: getWarehouseValue("update_or_delivery_status"),
UpdateStatusWarehousePendingInactive: getWarehouseValue("update_status_warehouse_pending_inactive"), UpdateStatusWarehousePendingInactive: getWarehouseValue("update_status_warehouse_pending_inactive"),
UpdateIsSellyMall: getWarehouseValue("update_is_selly_mall"), MigrationIsSellyMall: getWarehouseValue("migration_is_selly_mall"),
} }