🐛 Fix a small bug with the display of images

This commit is contained in:
ajnart
2022-08-11 17:04:43 +02:00
parent cf89141f82
commit 4f94999b07
4 changed files with 22 additions and 8 deletions

View File

@@ -8,7 +8,9 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
const configName = getCookie('config-name', { req });
const { config }: { config: Config } = getConfig(configName?.toString() ?? 'default').props;
const { query } = req.query;
const service = config.services.find((service) => service.type === 'Overseerr' || service.type === 'Jellyseerr');
const service = config.services.find(
(service) => service.type === 'Overseerr' || service.type === 'Jellyseerr'
);
// If query is an empty string, return an empty array
if (query === '' || query === undefined) {
return res.status(200).json([]);