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
b23fb0a4
Commit
b23fb0a4
authored
3 years ago
by
Treadway, Ross T (UG - Computer Science)
Browse files
Options
Downloads
Patches
Plain Diff
Adding get_ids
parent
c995392d
Branches
main
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/auth_controller.rb
+14
-0
14 additions, 0 deletions
app/controllers/auth_controller.rb
with
14 additions
and
0 deletions
app/controllers/auth_controller.rb
+
14
−
0
View file @
b23fb0a4
...
@@ -26,6 +26,20 @@ class AuthController < ApplicationController
...
@@ -26,6 +26,20 @@ class AuthController < ApplicationController
render
json:
{
emails:
emails
},
status:
200
render
json:
{
emails:
emails
},
status:
200
end
end
def
get_ids
emails
=
params
[
"auth"
][
"emails"
]
ids
=
[]
if
emails
.
kind_of?
(
Array
)
emails
.
each
do
|
e
|
ids
.
push
(
User
.
find_by
(
email:
e
).
id
)
end
else
ids
.
push
(
User
.
find_by
(
email:
emails
).
id
)
end
render
json:
{
ids:
ids
},
status:
200
end
def
password_reset_token
def
password_reset_token
token
,
hashed_token
=
Devise
.
token_generator
.
generate
(
User
,
:reset_password_token
)
token
,
hashed_token
=
Devise
.
token_generator
.
generate
(
User
,
:reset_password_token
)
user
=
User
.
find_by
(
email:
params
[
"email"
])
user
=
User
.
find_by
(
email:
params
[
"email"
])
...
...
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