add auth-service not verified with Dockerfile
This commit is contained in:
parent
3a7389ba68
commit
8cf6520224
12 changed files with 304 additions and 0 deletions
16
backend/service-authentication/mongodbQueries.js
Normal file
16
backend/service-authentication/mongodbQueries.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
const config = require('./config');
|
||||
const mongoDB = require ('./mongodbConnect').getDB();
|
||||
|
||||
function checkLoginQuery(login, password){
|
||||
// SELECT idUtilisateurs
|
||||
// FROM utilisateurs
|
||||
// WHERE login = ? AND password = ?;
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(mongoDB.collection(config.mongodbUtilisateurs).find(
|
||||
{login: login, password: password},
|
||||
{projection: {idUtilisateur: 1, _id: 0}}).toArray());
|
||||
});
|
||||
}
|
||||
module.exports.checkLoginQuery = checkLoginQuery;
|
||||
|
||||
|
||||
Reference in a new issue