Create edit_key global in ApiController
This commit is contained in:
parent
6b24970c54
commit
4b7b48cbd3
1 changed files with 6 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ module Api
|
||||||
@current_user
|
@current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def edit_key
|
||||||
|
@edit_key ||= request.headers['X-Edit-Key'] if request.headers['X-Edit-Key']
|
||||||
|
|
||||||
|
@edit_key
|
||||||
|
end
|
||||||
|
|
||||||
# Set the response content-type
|
# Set the response content-type
|
||||||
def content_type(content_type)
|
def content_type(content_type)
|
||||||
response.headers['Content-Type'] = content_type
|
response.headers['Content-Type'] = content_type
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue