Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
web-cw-group-24-auth-microservice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Treadway, Ross T (UG - Computer Science)
web-cw-group-24-auth-microservice
Commits
2fa916e2
Commit
2fa916e2
authored
3 years ago
by
Treadway, Ross T (UG - Computer Science)
Browse files
Options
Downloads
Patches
Plain Diff
Correcting mispellings and adjusting get_email
parent
ef3342f7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/auth_controller.rb
+7
-3
7 additions, 3 deletions
app/controllers/auth_controller.rb
lib/my_failure_app.rb
+1
-1
1 addition, 1 deletion
lib/my_failure_app.rb
with
8 additions
and
4 deletions
app/controllers/auth_controller.rb
+
7
−
3
View file @
2fa916e2
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/my_failure_app.rb
+
1
−
1
View file @
2fa916e2
...
...
@@ -6,6 +6,6 @@ class MyFailureApp < Devise::FailureApp
def
json_failure
self
.
status
=
401
self
.
content_type
=
'application/json'
self
.
response_body
=
"{'error' : 'authentica
i
tion error'}"
.
to_json
self
.
response_body
=
"{'error' : 'authentication error'}"
.
to_json
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment