Add emoji react api POST method (same PUT)

This commit is contained in:
KMY 2023-02-25 11:14:16 +09:00
parent 15bc0df759
commit d7a251edc9
3 changed files with 10 additions and 6 deletions

View file

@ -207,7 +207,7 @@ export function emojiReact(status, emoji) {
return function (dispatch, getState) {
dispatch(emojiReactRequest(status, emoji));
api(getState).put(`/api/v1/statuses/${status.get('id')}/emoji_reactions/${emoji.custom ? (emoji.name + (emoji.domain || '')) : emoji.native}`).then(function (response) {
api(getState).post(`/api/v1/statuses/${status.get('id')}/emoji_reactions`, { emoji: emoji.custom ? (emoji.name + (emoji.domain || '')) : emoji.native }).then(function (response) {
dispatch(importFetchedStatus(response.data));
dispatch(emojiReactSuccess(status, emoji));
}).catch(function (error) {