This commit is contained in:
yystopf 2023-02-27 10:55:53 +08:00
parent 2e0b32f86b
commit a30a3c56b6
3 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class Api::V1::Issues::Journals::CreateService < ApplicationService
end end
def build_atme_participants def build_atme_participants
atme_receivers.each do |receiver| @atme_receivers.each do |receiver|
@created_issue.issue_participants.new({participant_type: "atme", participant_id: receiver.id}) @created_issue.issue_participants.new({participant_type: "atme", participant_id: receiver.id})
end end
end end

View File

@ -47,7 +47,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService
private private
def build_atme_participants def build_atme_participants
atme_receivers.each do |receiver| @atme_receivers.each do |receiver|
@created_issue.issue_participants.new({participant_type: "atme", participant_id: receiver.id}) @created_issue.issue_participants.new({participant_type: "atme", participant_id: receiver.id})
end end
end end

View File

@ -43,7 +43,7 @@ class Api::V1::Issues::ListService < ApplicationService
case participant_category case participant_category
when 'aboutme' # 关于我的 when 'aboutme' # 关于我的
issues = issues.joins(:issue_participants).where(issue_participants: {participant_type: %(authored assigned atme), participant_id: current_user&.id}) issues = issues.joins(:issue_participants).where(issue_participants: {participant_type: %w(authored assigned atme), participant_id: current_user&.id})
when 'authoredme' # 我创建的 when 'authoredme' # 我创建的
issues = issues.joins(:issue_participants).where(issue_participants: {participant_type: 'authored', participant_id: current_user&.id}) issues = issues.joins(:issue_participants).where(issue_participants: {participant_type: 'authored', participant_id: current_user&.id})
when 'assignedme' # 我负责的 when 'assignedme' # 我负责的