-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathutils.js
45 lines (34 loc) · 1.01 KB
/
utils.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
var crypto = require('crypto');
module.exports.parseOutPassword = function(company){
if(company != undefined && company['password'] != null){
delete company['password'];
}
return company;
}
module.exports.validUsername = function (username) {
return true;//TODO
};
module.exports.validAirlineClass = function(airline_class){
if(airline_class == "0" || airline_class == "1" || airline_class == "2") {
return true;
}
return false;
};
module.exports.validVenueName = function(venue){
return true;//TODO
};
module.exports.validLocation = function(location){
return true;//TODO
};
module.exports.validName = function(name){
return true;//TODO
};
module.exports.validCompanyName = function (company_name) {
return true;//TODO
};
module.exports.validPassword = function (password) {
return true;//TODO
};
module.exports.hashPassword = function (password) {
return crypto.createHash('md5').update(password).digest('hex');
};