From 7a18a891319c175ceaafe11f245329426511e7ba Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Tue, 10 Sep 2019 05:46:52 +0200 Subject: [PATCH] return request directly --- app/helpers/url.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/helpers/url.js b/app/helpers/url.js index 78036c5..10512ff 100644 --- a/app/helpers/url.js +++ b/app/helpers/url.js @@ -4,8 +4,7 @@ const currentRERequest = async req => { const uniqueId = req.params["request_id"]; if (!uniqueId) return null; - const request = await db.RealEstateRequest.findOne({ where: { uniqueId } }); - return request; + return await db.RealEstateRequest.findOne({ where: { uniqueId } }); }; module.exports = { currentRERequest