add some changes

This commit is contained in:
2026-01-15 09:44:57 +00:00
parent 9b1f85479b
commit 1d9406c93a
19 changed files with 4922 additions and 887 deletions

View File

@@ -156,6 +156,19 @@ func (h *Handler) ListClients(c *gin.Context) {
// Parse search query
opts.Search = c.Query("search")
// Parse category filter
if category := c.Query("category"); category != "" {
// Validate category
validCategories := map[string]bool{
"File": true,
"Database": true,
"Virtual": true,
}
if validCategories[category] {
opts.Category = category
}
}
clients, err := h.service.ListClients(c.Request.Context(), opts)
if err != nil {
h.logger.Error("Failed to list clients", "error", err)