Skip to content

Commit

Permalink
Update authController.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtranoDev authored Sep 22, 2023
1 parent 4c32b03 commit 8f1ec07
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ async function createUser(req, res, next) {
const hashedPassword = await bcrypt.hash(password, salt);

const user = {
first_name,
last_name,
first_name: 'John',
last_name: 'Doe',
email: req.email,
phone,
password_hash: hashedPassword,
is_admin,
profile_pic,
profile_pic: 'https://cdn-icons-png.flaticon.com/512/147/147142.png',
org_id: req.org_id,
lunch_credit_balance,
lunch_credit_balance: 10,
refresh_token,
bank_code,
bank_name,
Expand Down Expand Up @@ -101,9 +101,7 @@ const loginUser = async (req, res, next) => {
statusCode: 200,
data: {
access_token: token,
email: user.email,
id: user.id,
is_admin: user.is_admin,
user: user,
},
});
} catch (error) {
Expand Down

0 comments on commit 8f1ec07

Please sign in to comment.