반응형
User.findAndCountAll({where:{"USER_ID":param.user_id}}).then(async (result) => {
for await (const dtResult of result.rows) {
let user_id = dtResult.USER_ID;
let mongoUserScriptInfo = await mongoUserScript.find({"USER_ID":user_id});
}
});
then에 async, for문에 await (순서 보장을 위함)
반응형