user must profile compeleted before apply auth

dev_forum
p31729568 6 years ago
parent db3366aaed
commit bc10b0c43f

@ -9,6 +9,8 @@ class Users::ApplyAuthenticationService < ApplicationService
end
def call
raise Error, '请先完善基本信息' unless user.profile_completed?
Users::ApplyAuthenticationForm.new(params).validate!
raise Error, '您已经申请过实名认证了' if ApplyUserAuthentication.real_name_auth.processing.exists?(user_id: user.id)

@ -9,6 +9,8 @@ class Users::ApplyProfessionalAuthService < ApplicationService
end
def call
raise Error, '请先完善基本信息' unless user.profile_completed?
Users::ApplyProfessionalAuthForm.new(params).validate!
raise Error, '您已经申请过职业认证了' if ApplyUserAuthentication.professional_auth.processing.exists?(user_id: user.id)

@ -5,6 +5,7 @@ json.results do
json.type obj.class.name.downcase
json.title highlights.delete(:name)&.join('...') || obj.searchable_title
json.description highlights.values[0,5].each { |arr| arr.is_a?(Array) ? arr.join('...') : arr }.join('<br/>')
# json.description highlights.values[0,5].each { |arr| arr.is_a?(Array) ? arr.join('...') : arr }.join('<br/>')
json.content highlights
end
end
Loading…
Cancel
Save