api: always return json

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-12-14 09:57:21 +01:00
parent 131e6e7fb6
commit 5ae8decbc0
4 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ export default async function handler(req: Request, res: NextApiResponse) {
})), })),
}); });
res.status(200).end(); res.status(200).json({ status: 'ok' });
} catch (error) { } catch (error) {
handleError(res, error); handleError(res, error);
} }

View File

@@ -30,7 +30,7 @@ export default async function handler(req: Request, res: NextApiResponse) {
profileId, profileId,
}); });
res.status(200).end(); res.status(200).json({ status: 'ok' });
} catch (error) { } catch (error) {
handleError(res, error); handleError(res, error);
} }

View File

@@ -30,7 +30,7 @@ export default async function handler(req: Request, res: NextApiResponse) {
profileId, profileId,
}); });
res.status(200).end(); res.status(200).json({ status: 'ok' });
} catch (error) { } catch (error) {
handleError(res, error); handleError(res, error);
} }

View File

@@ -46,7 +46,7 @@ export default async function handler(req: Request, res: NextApiResponse) {
}, },
}); });
res.status(200).end(); res.status(200).json({ status: 'ok' });
} catch (error) { } catch (error) {
handleError(res, error); handleError(res, error);
} }