Merge branch 'standalone_develop' into pre_trustie_server

This commit is contained in:
xiaoxiaoqiong 2022-05-24 14:01:01 +08:00
commit 0fc96026c8
2 changed files with 8 additions and 2 deletions

View File

@ -376,6 +376,11 @@ class UsersController < ApplicationController
UserExtension.create!(user_id: user.id, gender: 1, custom_department: "#{department_name}")
interactor = Gitea::RegisterInteractor.call({username: login, email: email, password: "12345678"})
if interactor.success?
gitea_user = interactor.result
result = Gitea::User::GenerateTokenService.call(username, password)
user.gitea_token = result['sha1']
user.gitea_uid = gitea_user[:body]['id']
user.save!
else
Rails.logger.info("Gitea::RegisterInteractor.call error====== #{interactor.error}")
end

View File

@ -11,7 +11,7 @@ json.user_identity @user.identity
json.tidding_count 0
json.user_phone_binded @user.phone.present?
json.need_edit_info @user.need_edit_info?
json.phone @user.phone
# json.phone @user.phone
# json.email @user.mail
json.profile_completed @user.profile_is_completed?
json.professional_certification @user.professional_certification
@ -25,4 +25,5 @@ json.description @user.description
json.super_description @user.super_description
json.(@user, :show_email, :show_department, :show_location, :show_super_description)
json.message_unread_total @message_unread_total
json.has_trace_user @user.trace_user.present?
json.has_trace_user @user.trace_user.present?
json.is_new params[:login].to_s.include?("#{@user.login}")