Browse Source

将issue_links接口改为支持数组类型

pull/347/head
呱呱呱 2 years ago
parent
commit
be45e45dbc
1 changed files with 2 additions and 9 deletions
  1. +2
    -9
      app/controllers/api/pm/issue_links_controller.rb

+ 2
- 9
app/controllers/api/pm/issue_links_controller.rb View File

@@ -6,15 +6,8 @@ class Api::Pm::IssueLinksController < Api::Pm::BaseController
end

def create
@link = @issue.pm_links.find_or_create_by(be_linkable_type: 'Issue', be_linkable_id: params[:link_id])
data = {
data: {
id: @link.id,
issue_id: @link.linkable_id,
linked_issue_id: @link.be_linkable_id
}
}
render_ok(data)
params[:link_ids].map { |e| @issue.pm_links.find_or_create_by(be_linkable_type: 'Issue', be_linkable_id: e) }
render_ok
end

def destroy


Loading…
Cancel
Save