diff options
Diffstat (limited to 'internal/admin/api_mobs.go')
| -rw-r--r-- | internal/admin/api_mobs.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/admin/api_mobs.go b/internal/admin/api_mobs.go index a575076..0646753 100644 --- a/internal/admin/api_mobs.go +++ b/internal/admin/api_mobs.go @@ -138,8 +138,8 @@ func (s *AdminServer) createMob(w http.ResponseWriter, r *http.Request) { http.Error(w, `{"error":"invalid json body"}`, http.StatusBadRequest) return } - id, _ := m["id"].(string) - if strings.TrimSpace(id) == "" { + id, ok := m["id"].(string) + if !ok || strings.TrimSpace(id) == "" { http.Error(w, `{"error":"missing mob id"}`, http.StatusBadRequest) return } |
