Merge branch 'dev_trustie' of http://gitea.trustie.net/jasder/forgeplus into dev_trustie
This commit is contained in:
commit
38dd7b87d8
|
@ -145,7 +145,7 @@ class IssuesController < ApplicationController
|
|||
change_params = {
|
||||
change_type: "minusToken",
|
||||
tokens: params[:token]
|
||||
}.merge(tokens_params(@proeject))
|
||||
}.merge(tokens_params(@project))
|
||||
ChangeTokenJob.perform_later(change_params)
|
||||
end
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class ChangeTokenJob < ApplicationJob
|
|||
end
|
||||
end
|
||||
unless status == 200
|
||||
Rails.logger.info("########_change_user_toke_failed__change_params:__#{change_parame}_")
|
||||
Rails.logger.info("########_change_user_toke_failed__change_params:__#{change_params}_")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ class User < ApplicationRecord
|
|||
where("LOWER(concat(lastname, firstname, login, mail)) LIKE ?", "%#{keywords.split(" ").join('|')}%") unless keywords.blank?
|
||||
}
|
||||
|
||||
scope :simple_select, -> {select(:id, :login, :lastname,:firstname, :nickname, :gitea_uid)}
|
||||
|
||||
attr_accessor :password, :password_confirmation
|
||||
|
||||
delegate :gender, :department_id, :school_id, :location, :location_city, :technical_title, to: :user_extension, allow_nil: true
|
||||
|
|
|
@ -5,11 +5,20 @@ else
|
|||
json.total_count @hash_commit[:total_count]
|
||||
json.commits do
|
||||
json.array! @hash_commit[:body] do |commit|
|
||||
commiter = commit['committer']
|
||||
if commiter.present?
|
||||
commit_user_id = commiter['id']
|
||||
forge_user = User.simple_select.find_by(gitea_uid: commit_user_id)
|
||||
end
|
||||
json.sha commit['sha']
|
||||
json.message commit['commit']['message']
|
||||
json.timestamp render_unix_time(commit['commit']['author']['date'])
|
||||
json.time_from_now time_from_now(commit['commit']['author']['date'])
|
||||
json.partial! 'author', user: @project_owner
|
||||
if forge_user
|
||||
json.partial! 'author', user: forge_user
|
||||
else
|
||||
json.author nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,5 +12,6 @@ json.user_phone_binded @user.phone.present?
|
|||
# json.email @user.mail
|
||||
json.profile_completed @user.profile_completed?
|
||||
json.professional_certification @user.professional_certification
|
||||
json.is_watch current_user&.watched?(@user)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue