Browse Source

修复

pull/342/head
yystopf 3 years ago
parent
commit
a30a3c56b6
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/services/api/v1/issues/journals/create_service.rb
  2. +1
    -1
      app/services/api/v1/issues/journals/update_service.rb
  3. +1
    -1
      app/services/api/v1/issues/list_service.rb

+ 1
- 1
app/services/api/v1/issues/journals/create_service.rb View File

@@ -66,7 +66,7 @@ class Api::V1::Issues::Journals::CreateService < ApplicationService
end

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})
end
end

+ 1
- 1
app/services/api/v1/issues/journals/update_service.rb View File

@@ -47,7 +47,7 @@ class Api::V1::Issues::Journals::UpdateService < ApplicationService
private

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})
end
end


+ 1
- 1
app/services/api/v1/issues/list_service.rb View File

@@ -43,7 +43,7 @@ class Api::V1::Issues::ListService < ApplicationService

case participant_category
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' # 我创建的
issues = issues.joins(:issue_participants).where(issue_participants: {participant_type: 'authored', participant_id: current_user&.id})
when 'assignedme' # 我负责的


Loading…
Cancel
Save