add await

This commit is contained in:
Jay 2018-08-28 23:42:13 +08:00
parent 9161c6d7db
commit fb4474b44e

View File

@ -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()