Fix code discrepancies with upstream

This commit is contained in:
Claire 2023-11-15 21:52:19 +01:00
parent d358a3cc61
commit f69f1e9429

View file

@ -211,7 +211,7 @@ export function bookmark(status) {
api(getState).post(`/api/v1/statuses/${status.get('id')}/bookmark`).then(function (response) {
dispatch(importFetchedStatus(response.data));
dispatch(bookmarkSuccess(status));
dispatch(bookmarkSuccess(status, response.data));
}).catch(function (error) {
dispatch(bookmarkFail(status, error));
});
@ -224,7 +224,7 @@ export function unbookmark(status) {
api(getState).post(`/api/v1/statuses/${status.get('id')}/unbookmark`).then(response => {
dispatch(importFetchedStatus(response.data));
dispatch(unbookmarkSuccess(status));
dispatch(unbookmarkSuccess(status, response.data));
}).catch(error => {
dispatch(unbookmarkFail(status, error));
});
@ -238,10 +238,11 @@ export function bookmarkRequest(status) {
};
}
export function bookmarkSuccess(status) {
export function bookmarkSuccess(status, response) {
return {
type: BOOKMARK_SUCCESS,
status: status,
response: response,
};
}
@ -260,10 +261,11 @@ export function unbookmarkRequest(status) {
};
}
export function unbookmarkSuccess(status) {
export function unbookmarkSuccess(status, response) {
return {
type: UNBOOKMARK_SUCCESS,
status: status,
response: response,
};
}