Commit 25a7db5d by Kevin Chugh

add JSON update

parent 790e719e
...@@ -46,6 +46,7 @@ helpers do ...@@ -46,6 +46,7 @@ helpers do
def pin(obj) def pin(obj)
raise ArgumentError, "User id is required" unless user raise ArgumentError, "User id is required" unless user
obj.pinned = true obj.pinned = true
puts "\n\n\n\n\n\n******************HELLOE"
obj.save obj.save
obj.reload.to_hash.to_json obj.reload.to_hash.to_json
end end
......
...@@ -177,6 +177,7 @@ class CommentThread < Content ...@@ -177,6 +177,7 @@ class CommentThread < Content
"tags" => tags_array, "tags" => tags_array,
"type" => "thread", "type" => "thread",
"group_id" => group_id, "group_id" => group_id,
"pinned" => pinned,
"endorsed" => endorsed?) "endorsed" => endorsed?)
if params[:recursive] if params[:recursive]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment