mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
add: message touch condition
This commit is contained in:
@@ -6,7 +6,8 @@ class Projects::ProjectUnitsController < Projects::BaseController
|
||||
def create
|
||||
if current_user.admin? || @project.manager?(current_user)
|
||||
ActiveRecord::Base.transaction do
|
||||
ProjectUnit.update_by_unit_types!(@project, unit_types)
|
||||
before_units, after_units = ProjectUnit.update_by_unit_types!(@project, unit_types)
|
||||
SendTemplateMessageJob.perform_later('ProjectSettingChanged', current_user.id, @project&.id, {navbar: true}) unless before_units.eql?(after_units)
|
||||
render_ok
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user