caipin %!s(int64=5) %!d(string=hai) anos
pai
achega
118794c4d5
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      app/models/client.js

+ 6 - 5
app/models/client.js

@@ -109,11 +109,11 @@ client.findById=async function(cid,attributes){
 
     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,
-//    		  { replacements: [cid], type: sequelize.QueryTypes.SELECT }
-//    		).then(function(projects) {
-//    		  console.log(projects)
-//    		})
+    sequelize.query(sqlQuery,
+    		  { replacements: [cid], type: sequelize.QueryTypes.SELECT }
+    		).then(function(projects) {
+    		  console.log(projects)
+    		})
     
 //       await this.sequelize.query(sqlQuery,
 //    		type: sequelize.QueryTypes.SELECT,
@@ -128,6 +128,7 @@ 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];
+        console.log(staffDetail)
     });