Skip to content

Instantly share code, notes, and snippets.

@Nirvikalpa108
Last active April 21, 2019 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nirvikalpa108/f70b5428d250bbc853a20501264e803a to your computer and use it in GitHub Desktop.
Save Nirvikalpa108/f70b5428d250bbc853a20501264e803a to your computer and use it in GitHub Desktop.
Diaper Issue 773
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