Radarr/frontend/src/Store/Actions/Settings/plex.js
ta264 4154414adf Add OIDC and Plex authentication methods
(cherry picked from commit 3ff3de6b90704fba266833115cd9d03ace99aae9)
2022-12-04 23:43:41 +00:00

48 lines
755 B
JavaScript

import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
import { createThunk } from 'Store/thunks';
//
// Variables
const section = 'settings.plex';
//
// Actions Types
export const FETCH_PLEX_RESOURCES = 'settings/plex/fetchResources';
//
// Action Creators
export const fetchPlexResources = createThunk(FETCH_PLEX_RESOURCES);
//
// Details
export default {
//
// State
defaultState: {
isFetching: false,
isPopulated: false,
error: null,
pendingChanges: {},
isSaving: false,
saveError: null,
items: []
},
//
// Action Handlers
actionHandlers: {
[FETCH_PLEX_RESOURCES]: createFetchHandler(section, '/authentication/plex/resources')
},
//
// Reducers
reducers: { }
};