mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
Initial Commit Rework
This commit is contained in:
parent
74a4cc048c
commit
95051cbd63
2483 changed files with 101351 additions and 111396 deletions
39
frontend/src/Store/Middleware/middlewares.js
Normal file
39
frontend/src/Store/Middleware/middlewares.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { applyMiddleware, compose } from 'redux';
|
||||
import ravenMiddleware from 'redux-raven-middleware';
|
||||
import thunk from 'redux-thunk';
|
||||
import { routerMiddleware } from 'react-router-redux';
|
||||
import persistState from './persistState';
|
||||
|
||||
export default function(history) {
|
||||
const {
|
||||
analytics,
|
||||
branch,
|
||||
version,
|
||||
release,
|
||||
isProduction
|
||||
} = window.Sonarr;
|
||||
|
||||
const dsn = isProduction ? 'https://b80ca60625b443c38b242e0d21681eb7@sentry.sonarr.tv/13' :
|
||||
'https://8dbaacdfe2ff4caf97dc7945aecf9ace@sentry.sonarr.tv/12';
|
||||
|
||||
const middlewares = [];
|
||||
|
||||
if (analytics) {
|
||||
middlewares.push(ravenMiddleware(dsn, {
|
||||
environment: isProduction ? 'production' : 'development',
|
||||
release,
|
||||
tags: {
|
||||
branch,
|
||||
version
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
middlewares.push(routerMiddleware(history));
|
||||
middlewares.push(thunk);
|
||||
|
||||
return compose(
|
||||
applyMiddleware(...middlewares),
|
||||
persistState
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue