Compare commits

...

2 Commits

Author SHA1 Message Date
kingphon b240d7a9d1 Merge pull request 'add-migration' (#159) from feature/selly-mall-v1-kin into master
Reviewed-on: #159
2023-09-22 07:47:36 +00:00
kingphon f58dfd4291 add-migration 2023-09-22 14:47:16 +07:00
2 changed files with 20 additions and 0 deletions

View File

@ -202,3 +202,21 @@ func (w Warehouse) UpdateStatusWarehousePendingInactive(p model.UpdateStatusWare
}
return nil
}
// MigrationSellyMall ...
func (w Warehouse) MigrationSellyMall() error {
_, err := natsio.GetServer().Request(subject.Warehouse.MigrationIsSellyMall, toBytes(""))
if err != nil {
return err
}
var r struct {
Error string `json:"error"`
}
if r.Error != "" {
return errors.New(r.Error)
}
return nil
}

View File

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