Implement Company Search and Update API Documentation

- Introduced a new search functionality for companies, allowing advanced filtering capabilities including tags, business criteria, and location.
- Updated the API documentation to reflect changes in the search endpoint, enhancing clarity for API consumers.
- Refactored existing company-related API endpoints for consistency, including renaming and restructuring routes.
- Enhanced response structures to return company entities directly, simplifying the response handling in API endpoints.
- Removed unused query parameters and handlers, streamlining the company management functionality.
This commit is contained in:
n.nakhostin
2025-09-08 11:23:15 +03:30
parent 777bbfd714
commit ee830f8c1b
16 changed files with 589 additions and 5338 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ type AuthResponse struct {
type UserListResponse struct {
Users []*UserResponse `json:"users"`
Meta *response.Meta `json:"meta"`
Meta *response.Meta `json:"-"`
}
type SearchUsersForm struct {
+1 -1
View File
@@ -316,7 +316,7 @@ func (h *Handler) ListUsers(c echo.Context) error {
return response.InternalServerError(c, "Failed to list users")
}
return response.Success(c, users, "Users retrieved successfully")
return response.SuccessWithMeta(c, users, users.Meta, "Users retrieved successfully")
}
// GetUserByID gets a user by ID (admin only)