Merge pull request #771 from h3poteto/fix/put-update-filter

Fix http method to update filters
This commit is contained in:
AkiraFukushima 2021-05-09 23:15:52 +09:00 committed by GitHub
commit b1b81eb915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -855,7 +855,7 @@ export default class Mastodon implements MegalodonInterface {
})
}
}
return this.client.post<MastodonAPI.Entity.Filter>(`/api/v1/filters/${id}`, params).then(res => {
return this.client.put<MastodonAPI.Entity.Filter>(`/api/v1/filters/${id}`, params).then(res => {
return Object.assign(res, {
data: MastodonAPI.Converter.filter(res.data)
})

View file

@ -868,7 +868,7 @@ export default class Pleroma implements MegalodonInterface {
})
}
}
return this.client.post<PleromaAPI.Entity.Filter>(`/api/v1/filters/${id}`, params).then(res => {
return this.client.put<PleromaAPI.Entity.Filter>(`/api/v1/filters/${id}`, params).then(res => {
return Object.assign(res, {
data: PleromaAPI.Converter.filter(res.data)
})