Refactor API documentation and update endpoint tags for clarity
- Updated README.md to reflect changes in endpoint categories, renaming "Customers-Admin" to "Admin-Customers" and "Companies-Admin" to "Admin-Companies" for consistency. - Modified health check endpoint tags from "Health" to "Admin-Health" to align with the new naming convention. - Adjusted Swagger documentation to replace outdated tags and ensure accurate representation of the API structure. - Enhanced user and customer handler documentation to reflect the new "Admin-Authorization" and "Admin-Users" tags, improving clarity in the API documentation.
This commit is contained in:
@@ -81,14 +81,6 @@ func (s *customerService) CreateCustomer(ctx context.Context, form *CreateCustom
|
||||
return nil, errors.New("customer with this email already exists")
|
||||
}
|
||||
|
||||
// Check if company name already exists (for company customers)
|
||||
if form.Type == string(CustomerTypeCompany) && form.CompanyName != nil {
|
||||
existingCustomer, _ = s.repository.GetByCompanyName(ctx, *form.CompanyName)
|
||||
if existingCustomer != nil {
|
||||
return nil, errors.New("company with this name already exists")
|
||||
}
|
||||
}
|
||||
|
||||
// Check if registration number already exists (for company customers)
|
||||
if form.Type == string(CustomerTypeCompany) && form.RegistrationNumber != nil {
|
||||
existingCustomer, _ = s.repository.GetByRegistrationNumber(ctx, *form.RegistrationNumber)
|
||||
|
||||
Reference in New Issue
Block a user