|
@@ -108,10 +108,10 @@ client.findById=async function(cid,attributes){
|
|
|
var staffDetail=[];
|
|
|
|
|
|
var sqlQuery = 'SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=?';
|
|
|
- sequelize.query(sqlQuery,
|
|
|
+ await sequelize.query(sqlQuery,
|
|
|
{ replacements: [cid], type: sequelize.QueryTypes.SELECT }
|
|
|
- ).then(function(projects) {
|
|
|
- staffDetail=projects[0];
|
|
|
+ ).then(function(results) {
|
|
|
+ staffDetail=results[0];
|
|
|
})
|
|
|
|
|
|
// await this.sequelize.query('SELECT b.* FROM CLD_client_staff as a left join CLD_staff as b on (a.sid=b.sid) where a.cid=7').spread((results, metadata) => {
|