DELETE /api/v1/domain_blocks?domain=example.com doesn't work (develop)
On the develop branch, after the OpenAPI spec was added, the domain blocks controller now does it the way the official MastoAPI spec recommends, but it's broken the old way.
I managed to support both cases in Soapbox FE, but I figured I'd raise it since it has the potential to break in other frontends.
On the stable branch, Pleroma allows domain unmuting like this:
api(getState)
.delete(`/api/v1/domain_blocks?domain=${domain}`)
Now, it has to be passed in the request body:
api(getState)
.delete('/api/v1/domain_blocks', {
data: { domain },
})
To support both ways in Soapbox FE, I now pass the domain both as a query param and in the request body:
api(getState)
.delete('/api/v1/domain_blocks', {
params: { domain },
data: { domain },
})
(Side note: I'm a bit surprised OpenAPI doesn't complain about this. It seems really strict about body params, maybe not so much about URL params.)
Anyway it's not a huge deal for me, but might want to check it still works in Pleroma FE and maybe apps like Husky. Soapbox FE is originally a fork of Mastodon 2.8.4, so I guess even Mastodon went against their own spec at some point.