mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
add project pm
This commit is contained in:
11
app/controllers/api/pm/projects_controller.rb
Normal file
11
app/controllers/api/pm/projects_controller.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Api::Pm::ProjectsController < Api::Pm::BaseController
|
||||
|
||||
def convert
|
||||
@project = Project.joins(:owner).find params[:project_id]
|
||||
data = {
|
||||
owner: @project.owner.try(:login),
|
||||
identifier: @project.identifier
|
||||
}
|
||||
render_ok(data: data)
|
||||
end
|
||||
end
|
||||
@@ -232,15 +232,6 @@ class ProjectsController < ApplicationController
|
||||
def show
|
||||
end
|
||||
|
||||
def mp_show
|
||||
@project = Project.joins(:owner).find params[:project_id]
|
||||
data={
|
||||
owner:@project.owner.try(:login),
|
||||
identifier:@project.identifier
|
||||
}
|
||||
render_ok(data:data)
|
||||
end
|
||||
|
||||
def destroy
|
||||
if current_user.admin? || @project.manager?(current_user)
|
||||
ActiveRecord::Base.transaction do
|
||||
|
||||
Reference in New Issue
Block a user