This commit is contained in:
@@ -60,23 +60,6 @@ func (s *BudgetService) AddBudget(ctx context.Context, budget *BudgetEntity) (*B
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defaultCategories := []*category.CategoryEntity{
|
||||
{
|
||||
Name: "Транспорт",
|
||||
BudgetId: budget.Id,
|
||||
},
|
||||
{
|
||||
Name: "Продукты",
|
||||
BudgetId: budget.Id,
|
||||
},
|
||||
}
|
||||
for _, category := range defaultCategories {
|
||||
_, err = s.categoryService.AddCategory(ctx, category)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if err = tx.Commit(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user