This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
Gitlink
/
forgeplus
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
16
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
根据需求调整links 返回,调整links删除查询
pull/347/head
呱呱呱
2 years ago
parent
d758b367b1
commit
b0ecc0a30b
2 changed files
with
8 additions
and
8 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-3
app/controllers/api/pm/issue_links_controller.rb
+2
-5
app/views/api/pm/issue_links/index.json.jbuilder
+ 6
- 3
app/controllers/api/pm/issue_links_controller.rb
View File
@@ -11,8 +11,11 @@ class Api::Pm::IssueLinksController < Api::Pm::BaseController
end
def destroy
@link = @issue.pm_links.find params[:id]
@link.destroy
render_ok
@link = @issue.pm_links.find_by(be_linkable_type: 'Issue', be_linkable_id: params[:id])
if @link.try(:destroy)
render_ok
else
render_error('删除失败!')
end
end
end
+ 2
- 5
app/views/api/pm/issue_links/index.json.jbuilder
View File
@@ -1,7 +1,4 @@
json.links @links.each do |link|
json.id link.id
json.issue do
json.partial! "api/v1/issues/simple_detail", locals: {issue: link.be_linkable}
end
json.issues @links.each do |link|
json.partial! "api/v1/issues/simple_detail", locals: { issue: link.be_linkable }
end
Write
Preview
Loading…
Cancel
Save