Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joramas committed Mar 30, 2024
1 parent 1de24be commit ad70546
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion user/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def start_session(self, user):
# del user['_id']
user['_id'] = str(user['_id'])
session['logged_in'] = True
session['user'] = user
sessiostart_sessionn['user'] = user
return jsonify(user), 200

# create new user
Expand Down Expand Up @@ -53,6 +53,7 @@ def login(self, db):
}
user = db.users.find_one({'email':request.form.get('email')})
if user and pbkdf2_sha256.verify(request.form.get('password'), user['password']):
print(user["name"], "logged in")
return self.start_session(user)

# If this is reached something wrong Happened
Expand Down

0 comments on commit ad70546

Please sign in to comment.