Commit 18731e84 by liangyuzhe

临时去掉验证

parent b8b1c0de
......@@ -34,19 +34,19 @@ class PushsController < ApplicationController
return render json: { code: -1, message: 'user_device找不到,user_ids错误'}
end
token_array = token_and_options(request)
if token_array.blank?
return render json: { code: 401, message: 'token错误'}
end
# token_array = token_and_options(request)
# if token_array.blank?
# return render json: { code: 401, message: 'token错误'}
# end
params[:sync_push] ||= false
if validate_token(params[:app_name], token_array.first)
# if validate_token(params[:app_name], token_array.first)
push_sync(params[:sync_push], {user_ids: user_ids, message: message, igetui_opts: igetui_opts.merge(pusher_type: 'push_message_to_list')})
render json: { code: 0, message: 'success', describe: '异步任务正在处理'}
else
render json: { code: 401, message: 'token 错误/过期'}
end
# else
# render json: { code: 401, message: 'token 错误/过期'}
# end
end
......@@ -74,12 +74,12 @@ class PushsController < ApplicationController
message = JSON.parse(params[:message]) rescue {}
device_ids_opts = JSON.parse(params[:device_ids_opts]) rescue {}
token_array = token_and_options(request)
if token_array.blank?
return render json: { code: 401, message: 'token错误'}
end
# token_array = token_and_options(request)
# if token_array.blank?
# return render json: { code: 401, message: 'token错误'}
# end
if validate_token(params[:app_name], token_array.first)
# if validate_token(params[:app_name], token_array.first)
params[:sync_push] ||= false
push_sync(params[:sync_push], {device_ids_opts: device_ids_opts, message: message, app_type: params[:app_type], igetui_opts: igetui_opts.merge(pusher_type: 'push_message_to_list')})
......@@ -87,9 +87,9 @@ class PushsController < ApplicationController
render json: { code: 0, message: 'success', data: {remind: "请使用新的api,此api近期将不再维护,请尽快迁移到新的api,新api地址 http://apidoc.weiwenjia.com/docs/internal-dev-api/internal-dev-api-1boq6ctdm8m57"}}
else
render json: { code: 401, message: 'token 错误/过期'}
end
# else
# render json: { code: 401, message: 'token 错误/过期'}
# end
end
private
......
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