🚨 Lint and prettier fix

This commit is contained in:
ajnart
2022-06-21 16:21:40 +02:00
parent 91a249d953
commit f0bae49830
5 changed files with 64 additions and 54 deletions

View File

@@ -71,11 +71,13 @@ export default function CalendarComponent(props: any) {
const currentSonarrMedias: any[] = [];
Promise.all(
sonarrServices.map((service) =>
getMedias(service, 'sonarr').then((res) => {
currentSonarrMedias.push(...res.data);
}).catch(() => {
currentSonarrMedias.push([]);
})
getMedias(service, 'sonarr')
.then((res) => {
currentSonarrMedias.push(...res.data);
})
.catch(() => {
currentSonarrMedias.push([]);
})
)
).then(() => {
setSonarrMedias(currentSonarrMedias);
@@ -83,11 +85,13 @@ export default function CalendarComponent(props: any) {
const currentRadarrMedias: any[] = [];
Promise.all(
radarrServices.map((service) =>
getMedias(service, 'radarr').then((res) => {
currentRadarrMedias.push(...res.data);
}).catch(() => {
currentRadarrMedias.push([]);
})
getMedias(service, 'radarr')
.then((res) => {
currentRadarrMedias.push(...res.data);
})
.catch(() => {
currentRadarrMedias.push([]);
})
)
).then(() => {
setRadarrMedias(currentRadarrMedias);
@@ -95,11 +99,13 @@ export default function CalendarComponent(props: any) {
const currentLidarrMedias: any[] = [];
Promise.all(
lidarrServices.map((service) =>
getMedias(service, 'lidarr').then((res) => {
currentLidarrMedias.push(...res.data);
}).catch(() => {
currentLidarrMedias.push([]);
})
getMedias(service, 'lidarr')
.then((res) => {
currentLidarrMedias.push(...res.data);
})
.catch(() => {
currentLidarrMedias.push([]);
})
)
).then(() => {
setLidarrMedias(currentLidarrMedias);
@@ -107,11 +113,13 @@ export default function CalendarComponent(props: any) {
const currentReadarrMedias: any[] = [];
Promise.all(
readarrServices.map((service) =>
getMedias(service, 'readarr').then((res) => {
currentReadarrMedias.push(...res.data);
}).catch(() => {
currentReadarrMedias.push([]);
})
getMedias(service, 'readarr')
.then((res) => {
currentReadarrMedias.push(...res.data);
})
.catch(() => {
currentReadarrMedias.push([]);
})
)
).then(() => {
setReadarrMedias(currentReadarrMedias);