Renames in Frontend

This commit is contained in:
Qstick
2020-05-15 23:32:52 -04:00
committed by ta264
parent ee4e44b81a
commit ee43ccf620
387 changed files with 4036 additions and 4364 deletions
@@ -1,8 +1,8 @@
import createAjaxRequest from 'Utilities/createAjaxRequest';
import updateAlbums from 'Utilities/Album/updateAlbums';
import updateBooks from 'Utilities/Book/updateBooks';
import getSectionState from 'Utilities/State/getSectionState';
function createBatchToggleAlbumMonitoredHandler(section, fetchHandler) {
function createBatchToggleBookMonitoredHandler(section, fetchHandler) {
return function(getState, payload, dispatch) {
const {
bookIds,
@@ -11,19 +11,19 @@ function createBatchToggleAlbumMonitoredHandler(section, fetchHandler) {
const state = getSectionState(getState(), section, true);
dispatch(updateAlbums(section, state.items, bookIds, {
dispatch(updateBooks(section, state.items, bookIds, {
isSaving: true
}));
const promise = createAjaxRequest({
url: '/album/monitor',
url: '/book/monitor',
method: 'PUT',
data: JSON.stringify({ bookIds, monitored }),
dataType: 'json'
}).request;
promise.done(() => {
dispatch(updateAlbums(section, state.items, bookIds, {
dispatch(updateBooks(section, state.items, bookIds, {
isSaving: false,
monitored
}));
@@ -32,11 +32,11 @@ function createBatchToggleAlbumMonitoredHandler(section, fetchHandler) {
});
promise.fail(() => {
dispatch(updateAlbums(section, state.items, bookIds, {
dispatch(updateBooks(section, state.items, bookIds, {
isSaving: false
}));
});
};
}
export default createBatchToggleAlbumMonitoredHandler;
export default createBatchToggleBookMonitoredHandler;