Commit 1a115cec authored by Jacob Vosmaer's avatar Jacob Vosmaer

Make sure private_token for API is a string

parent 36dc6e6b
module API
module APIHelpers
def current_user
@current_user ||= User.find_by_authentication_token(params[:private_token] || env["HTTP_PRIVATE_TOKEN"])
private_token = (params[:private_token] || env["HTTP_PRIVATE_TOKEN"]).to_s
@current_user ||= User.find_by_authentication_token(private_token)
end
def user_project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment