правки ошибок и внешнего вида

This commit is contained in:
Kayashov.SM
2025-09-10 23:14:49 +04:00
parent 39ec47c6d7
commit de8264d0e6
8 changed files with 77 additions and 77 deletions

23
src/contexts/client.js Normal file
View 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;
}