Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
shells
manager2-api
Commits
d685c330
Commit
d685c330
authored
Feb 08, 2020
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add route to do email lookups for any user
parent
3fffa217
Pipeline
#2095
passed with stage
in 3 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
routes/v1/user.rb
routes/v1/user.rb
+13
-0
No files found.
routes/v1/user.rb
View file @
d685c330
...
...
@@ -122,6 +122,19 @@ class Manager2Api < Sinatra::Base
erb
:result
,
locals:
{
message:
'Set new email contact address'
}
end
# Do a lookup for the contact email address of another user
post
'/v1/user/email/lookup'
do
check_key_admin
(
params
)
check_param
(
params
,
'username'
)
halt
erb
:error
,
locals:
{
code:
400
,
message:
'User not found'
}
unless
user_check
(
params
[
'username'
])
erb
:result
,
locals:
{
message:
'Retreived contact email address'
,
result:
mysql_get_contactmail
(
params
[
'username'
])
}
end
# Send an invite
post
'/v1/user/invite/new'
do
check_key
(
params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment