Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrity tests #2641

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions app/controllers/api/v2/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,15 @@ def authorize
end

def auth
response = { status: 'Error Auth' }
status = 401
authorize_account
if Account.current
self.cors_header
render json: { status: 'Sucess Auth' }, status: 200
else
self.cors_header
render json: { status: 'Error Auth' }, status: 401
response = { status: 'Sucess Auth' }
status = 200
end
self.cors_check
render json: response, status: status
end

USER_MODEL_FIELDS = %w(name email password password_confirmation)
Expand Down