0.2.78
This commit is contained in:
@@ -75,6 +75,15 @@ func (s *Server) handleRadarrWebhook(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusUnauthorized, "invalid webhook token")
|
||||
return
|
||||
}
|
||||
// A switched-off integration records nothing. Answering 200 rather than refusing is
|
||||
// deliberate: neither *arr re-delivers a rejection, so a failure here would look to the
|
||||
// operator like Memby losing imports rather than like the switch they set. The library
|
||||
// sweep is what reconciles whatever arrives while it is off.
|
||||
if s.integrationSuppressed(r.Context(), integrationRadarr) {
|
||||
s.loggerFor(r.Context()).Debug("radarr webhook ignored: integration switched off")
|
||||
writeJSON(w, http.StatusOK, map[string]any{"ok": true, "ignored": true})
|
||||
return
|
||||
}
|
||||
|
||||
var payload radarrWebhookPayload
|
||||
if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 1<<20)).Decode(&payload); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user