api: always return json
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user