From fb4474b44eac12f725b24f80afc1139f094ef49d Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 28 Aug 2018 23:42:13 +0800 Subject: [PATCH] add await --- libs/line-message/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/line-message/index.js b/libs/line-message/index.js index 8b6f472..2ba76cc 100644 --- a/libs/line-message/index.js +++ b/libs/line-message/index.js @@ -50,7 +50,7 @@ const saveToLog = async (source, text = '') => { let user = await db.query({text, values}) let data = null if (user.rowCount === 0) { - data = api.line.getUserInfo(groupId, userId) + data = await api.line.getUserInfo(groupId, userId) console.log('user data ::::: ', data) if (data === null) { db.release()