@ -15,6 +15,7 @@ module Mobile
raise('Unauthorized. Invalid or expired token.') unless current_user
end
def current_user
token = ApiKey.where(access_token: params[:token]).first
if token && !token.expired?