mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
feat: user exist route in write api
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user