Enhance Company Management with Category Integration and API Documentation Updates
- Updated the Company service to include category validation during creation and updates, ensuring that only valid categories are associated with companies. - Introduced a new CategoryResponse structure to encapsulate category details in API responses, improving the clarity of the data returned. - Enhanced the CompanyResponse structure to include category details, providing more comprehensive information in API responses. - Updated Swagger and YAML documentation to reflect the new category integration, including detailed descriptions and examples for the updated response structures. - Improved error handling for invalid category data during company creation and updates, enhancing the robustness of the API. - Refactored existing API handlers to accommodate the new category-related changes, ensuring a seamless user experience across the application.
This commit is contained in:
+1
-1
@@ -137,8 +137,8 @@ func main() {
|
||||
|
||||
// Initialize services with repositories
|
||||
userService := user.NewUserService(userRepository, logger, userAuthService, userValidator)
|
||||
companyService := company.NewCompanyService(companyRepository, logger)
|
||||
categoryService := company_category.NewCategoryService(categoryRepository, logger)
|
||||
companyService := company.NewCompanyService(companyRepository, categoryService, logger)
|
||||
customerService := customer.NewCustomerService(customerRepository, logger, customerAuthService, companyService)
|
||||
tenderService := tender.NewTenderService(tenderRepository, companyService, logger)
|
||||
feedbackService := feedback.NewFeedbackService(feedbackRepo, tenderService, logger)
|
||||
|
||||
Reference in New Issue
Block a user