fix MR comments
This commit is contained in:
@@ -28,5 +28,5 @@ MUX_TOKEN_SECRET=
|
|||||||
MUX_BROADCAST_SERVER_URL=rtmp://global-live.mux.com:5222/app
|
MUX_BROADCAST_SERVER_URL=rtmp://global-live.mux.com:5222/app
|
||||||
MUX_TEST_MODE_DISABLED=
|
MUX_TEST_MODE_DISABLED=
|
||||||
|
|
||||||
# Required for creating user throug API
|
# Required for creating user through API
|
||||||
CUSTOM_API_TOKEN=
|
CUSTOM_API_TOKEN=
|
||||||
@@ -16,11 +16,16 @@ class Api::UsersController < Api::ApiController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def user_params
|
def user_params
|
||||||
params.require(:user).permit(%i[email password])
|
params.require(:user).permit(%i[
|
||||||
|
email
|
||||||
|
password
|
||||||
|
first_name
|
||||||
|
last_name
|
||||||
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
def verify_custom_token
|
def verify_custom_token
|
||||||
if token.nil? || token.empty? || token != ENV['CUSTOM_API_TOKEN']
|
if token.blank? || token != ENV['CUSTOM_API_TOKEN']
|
||||||
unauthorized_entity(:user)
|
unauthorized_entity(:user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user