caipin пре 5 година
родитељ
комит
a39f0bd6b7
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      app/models/client.js

+ 4 - 4
app/models/client.js

@@ -108,7 +108,7 @@ 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=?';
-    await this.sequelize.query(sqlQuery,
+    sequelize.query(sqlQuery,
     		  { replacements: [cid], type: sequelize.QueryTypes.SELECT }
     		).then(function(projects) {
     		  console.log(projects[0])
@@ -116,9 +116,9 @@ client.findById=async function(cid,attributes){
     
 
     
-    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) => {
-        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) => {
+//        staffDetail=results[0];
+//    });
     
     
     detail['staff']=staffDetail;