feat: user exist route in write api

This commit is contained in:
Julian Lam
2020-11-06 11:55:04 -05:00
parent 6b196a207f
commit 1446cec77f
4 changed files with 28 additions and 21 deletions

View File

@@ -341,6 +341,10 @@ helpers.getHomePageRoutes = async function (uid) {
};
helpers.formatApiResponse = async (statusCode, res, payload) => {
if (res.req.method === 'HEAD') {
return res.sendStatus(statusCode);
}
if (String(statusCode).startsWith('2')) {
res.status(statusCode).json({
status: {