class Oauth::WechatController < Oauth::BaseController def create user, new_user = Oauth::CreateOrFindWechatAccountService.call(current_user ,params) successful_authentication(user) render_ok(new_user: new_user) rescue Oauth::CreateOrFindWechatAccountService::Error => ex render_error(ex.message) end end