diff --git a/src/common/helper.js b/src/common/helper.js index f0cee0cc..2a70c367 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -1000,7 +1000,8 @@ async function getMemberById (userId) { const res = await axios.get(`${config.MEMBERS_API_URL}?userId=${userId}`, { headers: { Authorization: `Bearer ${token}` } }) - return res.data || {} + if (res.data.length > 0) return res.data[0] + return {} } module.exports = {