Last active
April 21, 2019 15:13
-
-
Save Nirvikalpa108/f70b5428d250bbc853a20501264e803a to your computer and use it in GitHub Desktop.
Diaper Issue 773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create | |
return head :forbidden unless api_key_valid? | |
request = Request.new(request_params) | |
unless request&.partner&.approved? | |
request.status = "recertification_required" | |
end | |
if request.save | |
render json: request, status: :created | |
else | |
render json: request.errors, status: :bad_request | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment