docs: api comments say what the endpoints do, not how they came to be (#6277)
Rewrites the internal/api comment blocks to rule 32: task, milestone and rule ids gone, the stories behind them restated as the constraint they left, stale references corrected (the stream secret is wired from config, the timezone handler already refreshes the scheduler, the Android app is the native client, the design docs cited are not in the repo). Also rewraps comment lines over 80 columns left by the earlier batches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
||||
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
|
||||
)
|
||||
|
||||
// loudnessCoverageResp is the wire shape for GET /api/admin/library/loudness
|
||||
// (M464 #4995). measured + silent + unreadable + pending = total; missing
|
||||
// tracks are not counted. Enabled travels with the counts because with
|
||||
// loudnessCoverageResp is the wire shape for GET /api/admin/library/loudness.
|
||||
// measured + silent + unreadable + pending = total; missing tracks are not
|
||||
// counted. Enabled travels with the counts because with
|
||||
// analysis off, pending never shrinks, and a gauge implying progress would be
|
||||
// promising work nothing is doing.
|
||||
type loudnessCoverageResp struct {
|
||||
@@ -57,14 +57,15 @@ func loudnessSettingsBodyOf(s library.LoudnessSettings) loudnessSettingsBody {
|
||||
}
|
||||
}
|
||||
|
||||
// handleGetLoudnessSettings implements GET /api/admin/library/loudness-settings.
|
||||
// handleGetLoudnessSettings implements GET
|
||||
// /api/admin/library/loudness-settings.
|
||||
func (h *handlers) handleGetLoudnessSettings(w http.ResponseWriter, _ *http.Request) {
|
||||
writeJSON(w, http.StatusOK, loudnessSettingsBodyOf(h.loudnessSettings.Get()))
|
||||
}
|
||||
|
||||
// handleUpdateLoudnessSettings implements PUT /api/admin/library/loudness-settings.
|
||||
// A whole-row write: a body that leaves out the concurrency decodes it as zero,
|
||||
// which is refused rather than saved.
|
||||
// handleUpdateLoudnessSettings implements PUT
|
||||
// /api/admin/library/loudness-settings. A whole-row write: a body that leaves
|
||||
// out the concurrency decodes it as zero, which is refused rather than saved.
|
||||
func (h *handlers) handleUpdateLoudnessSettings(w http.ResponseWriter, r *http.Request) {
|
||||
var req loudnessSettingsBody
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user