mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
UI Action Handler Changes, Misc Fixes
This commit is contained in:
parent
7825319d89
commit
cd5b658196
193 changed files with 6992 additions and 6341 deletions
|
@ -2,33 +2,31 @@ import $ from 'jquery';
|
|||
import { set } from '../baseActions';
|
||||
|
||||
function createFetchSchemaHandler(section, url) {
|
||||
return function(payload) {
|
||||
return function(dispatch, getState) {
|
||||
dispatch(set({ section, isFetchingSchema: true }));
|
||||
return function(getState, payload, dispatch) {
|
||||
dispatch(set({ section, isFetchingSchema: true }));
|
||||
|
||||
const promise = $.ajax({
|
||||
url
|
||||
});
|
||||
const promise = $.ajax({
|
||||
url
|
||||
});
|
||||
|
||||
promise.done((data) => {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetchingSchema: false,
|
||||
schemaPopulated: true,
|
||||
schemaError: null,
|
||||
schema: data
|
||||
}));
|
||||
});
|
||||
promise.done((data) => {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetchingSchema: false,
|
||||
schemaPopulated: true,
|
||||
schemaError: null,
|
||||
schema: data
|
||||
}));
|
||||
});
|
||||
|
||||
promise.fail((xhr) => {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetchingSchema: false,
|
||||
schemaPopulated: true,
|
||||
schemaError: xhr
|
||||
}));
|
||||
});
|
||||
};
|
||||
promise.fail((xhr) => {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetchingSchema: false,
|
||||
schemaPopulated: true,
|
||||
schemaError: xhr
|
||||
}));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue