|
|
|
@ -100,7 +100,7 @@ class HacksController < ApplicationController
|
|
|
|
|
@hack.update_attribute(:status, 1)
|
|
|
|
|
base_attrs = {
|
|
|
|
|
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id,
|
|
|
|
|
parent_container_type: "HackPublish"
|
|
|
|
|
parent_container_type: "HackPublish", extra: @hack.identifier
|
|
|
|
|
}
|
|
|
|
|
@hack.tidings.create!(base_attrs)
|
|
|
|
|
render_ok
|
|
|
|
@ -111,7 +111,7 @@ class HacksController < ApplicationController
|
|
|
|
|
@hack.update_attribute(:status, 0)
|
|
|
|
|
base_attrs = {
|
|
|
|
|
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id,
|
|
|
|
|
parent_container_type: "HackUnPublish"
|
|
|
|
|
parent_container_type: "HackUnPublish", extra: @hack.identifier
|
|
|
|
|
}
|
|
|
|
|
@hack.tidings.create!(base_attrs)
|
|
|
|
|
render_ok
|
|
|
|
|