backend: Limitation d'appel à l'api openweathermap.org pour la fonction weatherRequest

This commit is contained in:
Divlo
2020-03-17 22:14:25 +01:00
parent 27d6531a98
commit 6a90fc764d
4 changed files with 54 additions and 6 deletions

View File

@ -4,7 +4,7 @@
* @param {Object} object { httpStatus, customProperties{Object}, result }
* @param {Boolean} isSuccess (false par defaut)
*/
function sendResponse (res, object, isSuccess = false) {
function sendResponse(res, object, isSuccess = false) {
res.status(object.httpStatus || 200).json({ isSuccess, ...object.customProperties, result: object.result });
}