Skip to content
Snippets Groups Projects
Commit 2fa916e2 authored by Treadway, Ross T (UG - Computer Science)'s avatar Treadway, Ross T (UG - Computer Science)
Browse files

Correcting mispellings and adjusting get_email

parent ef3342f7
No related branches found
No related tags found
No related merge requests found
......@@ -15,10 +15,14 @@ class AuthController < ApplicationController
def get_email
puts params
ids = params["auth"]["ids"]
puts ids
if authenticate_user!
puts "lolol"
puts params
render json: {email: User.find_by(id: params["id"]).email}
emails = []
ids.each do |i|
emails.push(User.find_by(id: i).email)
end
render json: { emails: emails }
else
auth_fail
end
......
......@@ -6,6 +6,6 @@ class MyFailureApp < Devise::FailureApp
def json_failure
self.status = 401
self.content_type = 'application/json'
self.response_body = "{'error' : 'authenticaition error'}".to_json
self.response_body = "{'error' : 'authentication error'}".to_json
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment