Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- post '/login' do
- email = @request_payload[:email]
- password = @request_payload[:password]
- #id = User.find_id_by_mail(email) # No esta mal solo el read.
- # instancia = User.filter({email => ...})
- id = User.filter({"@email"=>email})
- puts id
- user = User.find(id)
- if user.nil?
- halt 401
- elsif user.password != password || password.nil?
- halt 403
- end
- user.log_result.to_json
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement