refactor: remove legacy modules from API and UI

This commit is contained in:
2026-02-15 22:20:50 +03:00
parent 5518c3b405
commit 93c99b4506
45 changed files with 464 additions and 5610 deletions

View File

@@ -5,7 +5,6 @@ import (
"strings"
"reanimator/internal/repository/registry"
"reanimator/internal/repository/tickets"
"reanimator/internal/repository/timeline"
)
@@ -13,7 +12,6 @@ type AssetComponentDependencies struct {
Assets *registry.AssetRepository
Components *registry.ComponentRepository
Installations *registry.InstallationRepository
Tickets *tickets.TicketRepository
Timeline *timeline.EventRepository
}
@@ -69,29 +67,6 @@ func (h assetComponentHandlers) handleAsset(w http.ResponseWriter, r *http.Reque
return
}
if strings.HasSuffix(r.URL.Path, "/tickets") {
if r.Method != http.MethodGet {
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
if h.deps.Tickets == nil {
writeError(w, http.StatusInternalServerError, "tickets unavailable")
return
}
id, ok := parseSubresourceID(r.URL.Path, "/assets/", "/tickets")
if !ok {
writeError(w, http.StatusNotFound, "asset tickets not found")
return
}
items, err := h.deps.Tickets.ListByAsset(r.Context(), id)
if err != nil {
writeError(w, http.StatusInternalServerError, "list tickets failed")
return
}
writeJSON(w, http.StatusOK, map[string]any{"items": items})
return
}
if r.Method != http.MethodGet {
w.WriteHeader(http.StatusMethodNotAllowed)
return