правки ошибок и внешнего вида
This commit is contained in:
23
src/contexts/client.js
Normal file
23
src/contexts/client.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import axios from "axios";
|
||||
|
||||
const host = "192.168.1.100:30011";
|
||||
// const host = "tracker.kayashov.keenetic.pro";
|
||||
|
||||
export const radarr = () => {
|
||||
const res = axios;
|
||||
// res.defaults.baseURL = `${window.location.protocol}//${host}/radarr/`;
|
||||
res.defaults.baseURL = `${window.location.protocol}//${host}/`;
|
||||
res.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
res.defaults.headers.common['X-Api-Key'] = process.env.REACT_APP_RADARR_API_KEY;
|
||||
res.defaults.headers.common['Accept'] = 'application/json';
|
||||
return res;
|
||||
}
|
||||
|
||||
export const sonarr = () => {
|
||||
const res = axios;
|
||||
res.defaults.baseURL = `${window.location.protocol}//${host}/sonarr/`;
|
||||
res.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
res.defaults.headers.common['X-Api-Key'] = process.env.REACT_APP_RADARR_API_KEY;
|
||||
res.defaults.headers.common['Accept'] = 'application/json';
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user