Skip to content

Commit

Permalink
database changes
Browse files Browse the repository at this point in the history
  • Loading branch information
codewith-zach committed Sep 9, 2022
1 parent f25be6b commit f65385d
Show file tree
Hide file tree
Showing 3 changed files with 347 additions and 321 deletions.
2 changes: 0 additions & 2 deletions api/users/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ module.exports = {
createUsers: (req, res) => {
const body = req.body;
const salt = genSaltSync(10);
console.log(body.password);
body.password = hashSync(body.password, salt);
createUsers(body, (err, results) => {
if (err) {
Expand Down Expand Up @@ -81,7 +80,6 @@ module.exports = {
},
updateVisitors: (req, res) => {
const body = req.body;
console.log(body);
// const salt = genSaltSync(10);
// body.password = hashSync(body.password, salt);
updateVisitors(body, (err, results) => {
Expand Down
2 changes: 0 additions & 2 deletions api/users/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
);
},
createUsers: (data, callBack) => {
console.log(data)
pool.query(
`insert into users (username, email, first_name, last_name, phone_number, gender_id, department_id, password )
values(?,?,?,?,?,?,?,?)`,
Expand Down Expand Up @@ -368,7 +367,6 @@ const addVisitorTag = (visitorId) =>{
const tagNumb = JSON.parse(JSON.stringify(results));
numb = tagNumb[0].tag_number;
const val = visitorId + " " + numb;
console.log(val);
pool.query(
`insert into visitor_tag(visitor_id,tag) values(?,?)`,
[visitorId,numb]
Expand Down
Loading

0 comments on commit f65385d

Please sign in to comment.