Add /blacklist handler

This commit is contained in:
Tobias Gesellchen
2026-04-04 18:53:59 +02:00
parent 181cd550e3
commit cc92430e69
3 changed files with 9 additions and 4 deletions
+4
View File
@@ -780,6 +780,10 @@ func setupRouter(server *handlers.Server) *chi.Mux {
r.Route("/v1", func(r chi.Router) {
r.Post("/stapp/{deviceId}", server.HandleAppEvents)
r.Post("/scmudc/{deviceId}", server.HandleAppEvents)
// Return 405 Method Not Allowed as the upstream behavior also returns 405
r.Get("/blacklist/{deviceId}", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusMethodNotAllowed)
})
})
r.Route("/mgmt", func(r chi.Router) {
+1
View File
@@ -63,6 +63,7 @@ GET /streaming/device_setting/account/{account}/device/{device}/device_sett
GET /streaming/software/update/account/{account} handlers.(*Server).HandleMargeSoftwareUpdate-fm
GET /streaming/sourceproviders handlers.(*Server).HandleMargeSourceProviders-fm
GET /updates/soundtouch handlers.(*Server).HandleMargeSoftwareUpdate-fm
GET /v1/blacklist/{deviceId} setupRouter
GET /web/* setupRouter.(*Server).HandleWeb
HEAD /oauth/* handlers.(*Server).HandleBoseProxy-fm
OPTIONS /oauth/* handlers.(*Server).HandleBoseProxy-fm
+4 -4
View File
@@ -67,8 +67,8 @@ Interactions for `20260328-103522-477978/`:
| 0063 | mirror | ☑ | GET /streaming/account/{{accountId}}/device/{{device_id}}/group/ | 200 OK | ./mirror/streaming/account/{accountId}/device/{device_id}/group/0063-20260328-105138.464-GET.http |
| 0064 | mirror | ☑ | POST /streaming/support/customersupport | 200 OK | ./mirror/streaming/support/customersupport/0064-20260328-105138.499-POST.http |
| 0065 | mirror | ☑ | GET /streaming/account/{{accountId}}/provider_settings | 200 OK | ./mirror/streaming/account/{accountId}/provider_settings/0065-20260328-105138.554-GET.http |
| 0066 | upstream | | GET https://events.api.bosecm.com/v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./upstream/v1/blacklist/{device_id}/0066-20260328-105138.587-GET.http |
| 0067 | self | | GET /v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./self/v1/blacklist/{device_id}/0067-20260328-105138.588-GET.http |
| 0066 | upstream | | GET https://events.api.bosecm.com/v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./upstream/v1/blacklist/{device_id}/0066-20260328-105138.587-GET.http |
| 0067 | self | | GET /v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./self/v1/blacklist/{device_id}/0067-20260328-105138.588-GET.http |
| 0068 | self | ☑ | GET /streaming/device/{{device_id}}/streaming_token | 200 OK | ./self/streaming/device/{device_id}/streaming_token/0068-20260328-105138.703-GET.http |
| 0069 | self | ☑ | GET / | 200 OK | ./self/root/0069-20260328-105138.868-GET.http |
| 0070 | self | ☑ | GET /streaming/software/update/account/{{accountId}} | 200 OK | ./self/streaming/software/update/account/{accountId}/0070-20260328-105139.565-GET.http |
@@ -79,8 +79,8 @@ Interactions for `20260328-103522-477978/`:
| 0075 | self | | GET /streaming/account/{{accountId}}/full | 200 OK | ./self/streaming/account/{accountId}/full/0075-20260328-105140.030-GET.http |
| 0076 | mirror | | GET /streaming/account/{{accountId}}/full | 200 OK | ./mirror/streaming/account/{accountId}/full/0076-20260328-105140.172-GET.http |
| 0077 | self | ☑ | GET /updates/soundtouch?serialnumber=_serial_ | 200 OK | ./self/updates/soundtouch/0077-20260328-105140.196-GET.http |
| 0078 | upstream | | GET https://events.api.bosecm.com/v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./upstream/v1/blacklist/{device_id}/0078-20260328-105146.094-GET.http |
| 0079 | self | | GET /v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./self/v1/blacklist/{device_id}/0079-20260328-105146.094-GET.http |
| 0078 | upstream | | GET https://events.api.bosecm.com/v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./upstream/v1/blacklist/{device_id}/0078-20260328-105146.094-GET.http |
| 0079 | self | | GET /v1/blacklist/{{device_id}} | 405 Method Not Allowed | ./self/v1/blacklist/{device_id}/0079-20260328-105146.094-GET.http |
| 0080 | self | ☑ | POST /v1/scmudc/{{device_id}} | 200 OK | ./self/v1/scmudc/{device_id}/0080-20260328-105146.457-POST.http |
| 0081 | mirror | ☑ | POST /v1/scmudc/{{device_id}} | 200 OK | ./mirror/v1/scmudc/{device_id}/0081-20260328-105146.867-POST.http |
| 0082 | self | ☑ | POST /v1/scmudc/{{device_id}} | 200 OK | ./self/v1/scmudc/{device_id}/0082-20260328-105148.464-POST.http |