sm mobile site fix
This commit is contained in:
parent
bf45026040
commit
3add704d4a
1 changed files with 4 additions and 1 deletions
|
|
@ -89,7 +89,10 @@ class StatusMessagesController < ApplicationController
|
||||||
@status_message = current_user.posts.where(:id => params[:id]).first
|
@status_message = current_user.posts.where(:id => params[:id]).first
|
||||||
if @status_message
|
if @status_message
|
||||||
current_user.retract(@status_message)
|
current_user.retract(@status_message)
|
||||||
render 'destroy'
|
respond_to do |format|
|
||||||
|
format.js {render 'destroy'}
|
||||||
|
format.all {redirect_to root_url}
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
|
Rails.logger.info "event=post_destroy status=failure user=#{current_user.diaspora_handle} reason='User does not own post'"
|
||||||
render :nothing => true, :status => 404
|
render :nothing => true, :status => 404
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue