Initial commit

This commit is contained in:
Divlo
2020-03-16 22:55:32 +01:00
parent adf7c80c87
commit c8ffeea5da
160 changed files with 16417 additions and 18040 deletions

View File

@ -0,0 +1,11 @@
/**
* @description Envoie la réponse au client
* @param {Response} res Objet réponse d'une réponse http/express
* @param {Object} object { httpStatus, customProperties{Object}, result }
* @param {Boolean} isSuccess
*/
function sendResponse (res, object, isSuccess = false) {
res.status(object.httpStatus || 200).send({ isSuccess, ...object.customProperties, result: object.result });
}
module.exports = sendResponse;