fix(auth,services,profile): add request struct validation

Add validate tags and validators.Validate.Struct() calls on request structs for auth verification, service creation, and user patch test endpoints.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-05-31 18:49:12 +01:00
co-authored by Sisyphus
parent 577cceb304
commit 1d8247e655
3 changed files with 19 additions and 3 deletions
+4
View File
@@ -88,6 +88,10 @@ func CreateServiceHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Invalid JSON: "+err.Error(), http.StatusBadRequest)
return
}
if err := validators.Validate.Struct(&req); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
// Basic validation
if req.Name == "" {