diff options
Diffstat (limited to 'internal/admin/api_techs.go')
| -rw-r--r-- | internal/admin/api_techs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/admin/api_techs.go b/internal/admin/api_techs.go index bdb8295..0d3e201 100644 --- a/internal/admin/api_techs.go +++ b/internal/admin/api_techs.go @@ -25,8 +25,8 @@ func (s *AdminServer) handleTechs(w http.ResponseWriter, r *http.Request) { writeJSON(w, map[string]any{"error": "invalid json"}) return } - id, _ := m["id"].(string) - if strings.TrimSpace(id) == "" { + id, ok := m["id"].(string) + if !ok || strings.TrimSpace(id) == "" { writeJSON(w, map[string]any{"error": "missing id"}) return } |
