Skip to content
Snippets Groups Projects

added retriving emails

Merged Treadway, Ross T (UG - Computer Science) requested to merge master into main
3 files
+ 16
0
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -12,4 +12,15 @@ class AuthController < ApplicationController
@@ -12,4 +12,15 @@ class AuthController < ApplicationController
def auth_fail
def auth_fail
render json: { message: 'Failed to Authenticate User.'}
render json: { message: 'Failed to Authenticate User.'}
end
end
 
 
def get_email
 
puts params
 
if authenticate_user!
 
puts "lolol"
 
puts params
 
render json: {email: User.find_by(id: params["id"]).email}
 
else
 
auth_fail
 
end
 
end
end
end
 
\ No newline at end of file
Loading