mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
Renames in Frontend
This commit is contained in:
+7
-7
@@ -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;
|
||||
Reference in New Issue
Block a user