feat: http handlers — IO markers CRUD under /api/projects/:pid/io-markers
This commit is contained in:
@@ -45,6 +45,12 @@ func New(store *db.Store, frontend fs.FS) http.Handler {
|
||||
mux.HandleFunc("PATCH /api/projects/{pid}/devices/{id}", h.patchDevice)
|
||||
mux.HandleFunc("DELETE /api/projects/{pid}/devices/{id}", h.deleteDevice)
|
||||
|
||||
// IO markers (project-scoped) — wall-outlet terminators
|
||||
mux.HandleFunc("GET /api/projects/{pid}/io-markers", h.listIOMarkers)
|
||||
mux.HandleFunc("POST /api/projects/{pid}/io-markers", h.createIOMarker)
|
||||
mux.HandleFunc("PATCH /api/projects/{pid}/io-markers/{id}", h.patchIOMarker)
|
||||
mux.HandleFunc("DELETE /api/projects/{pid}/io-markers/{id}", h.deleteIOMarker)
|
||||
|
||||
// Frontend (embedded). Serve "/" → index.html via http.FileServerFS.
|
||||
// Wrap in noCache so the browser revalidates with the ETag/Last-Modified
|
||||
// the file server already emits — without this, browsers cache aggressively
|
||||
|
||||
Reference in New Issue
Block a user