Commit d685c330 authored by Cool Fire's avatar Cool Fire

Add route to do email lookups for any user

parent 3fffa217
Pipeline #2095 passed with stage
in 3 minutes and 56 seconds
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment