mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: bookmark topic button
This commit is contained in:
@ -248,13 +248,13 @@ class PostsController < ApplicationController
|
||||
|
||||
def bookmark
|
||||
post = find_post_from_params
|
||||
if current_user
|
||||
if params[:bookmarked] == "true"
|
||||
PostAction.act(current_user, post, PostActionType.types[:bookmark])
|
||||
else
|
||||
PostAction.remove_act(current_user, post, PostActionType.types[:bookmark])
|
||||
end
|
||||
|
||||
if params[:bookmarked] == "true"
|
||||
PostAction.act(current_user, post, PostActionType.types[:bookmark])
|
||||
else
|
||||
PostAction.remove_act(current_user, post, PostActionType.types[:bookmark])
|
||||
end
|
||||
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user