Fix Analytics
This commit is contained in:
@@ -23,13 +23,11 @@ func NewIngredientProcessor(ingredientRepo IngredientRepository, unitRepo UnitRe
|
||||
}
|
||||
|
||||
func (p *IngredientProcessorImpl) CreateIngredient(ctx context.Context, req *models.CreateIngredientRequest) (*models.IngredientResponse, error) {
|
||||
// Validate unit exists
|
||||
_, err := p.unitRepo.GetByID(ctx, req.UnitID, req.OrganizationID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Create ingredient entity
|
||||
ingredient := &entities.Ingredient{
|
||||
ID: uuid.New(),
|
||||
OrganizationID: req.OrganizationID,
|
||||
|
||||
Reference in New Issue
Block a user