Browse Source

add Pm issues link_index

pull/347/head
呱呱呱 2 years ago
parent
commit
ec43b9e97d
2 changed files with 7 additions and 2 deletions
  1. +3
    -2
      app/controllers/api/pm/issues_controller.rb
  2. +4
    -0
      config/routes/api.rb

+ 3
- 2
app/controllers/api/pm/issues_controller.rb View File

@@ -20,11 +20,12 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
end

def link_index
object_issues = Issue.includes(:pm_links).where( pm_project_id: params[:pm_project_id], root_id: nil ).where.not(pm_links: { linkable_id: params[:id] } )
@issues = kaminari_paginate(object_issues)
render 'api/v1/issues/index'
end



def show
@issue.associate_attachment_container
render 'api/v1/issues/show'


+ 4
- 0
config/routes/api.rb View File

@@ -9,6 +9,10 @@ defaults format: :json do
get :tags
get :statues
end
member do
get :link_index
end

resources :issue_links

resources :journals do


Loading…
Cancel
Save