Update Order

This commit is contained in:
aditya.siregar 2024-08-22 01:21:26 +07:00
parent 6fef2bbfff
commit cd630e57d8
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ func (s *DiscoveryService) GetByID(ctx context.Context, id int64) (*entity.Site,
return nil, err
}
if site.Status == "Inactive" {
if site.Status != "Active" {
return nil, nil
}

View File

@ -132,7 +132,7 @@ func (s *OrderService) CreateOrder(ctx mycontext.Context, req *entity.OrderReque
return nil, err
}
order, err = s.repo.FindByID(ctx, int64(order.Total))
order, err = s.repo.FindByID(ctx, order.ID)
if err != nil {
logger.ContextLogger(ctx).Error("error when creating order", zap.Error(err))
return nil, err