Merge pull request #5664 from svbergerem/remove-people-last_post
Remove last_post from PeopleController
This commit is contained in:
commit
f326b58d31
1 changed files with 1 additions and 7 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
class PeopleController < ApplicationController
|
class PeopleController < ApplicationController
|
||||||
before_action :authenticate_user!, except: [:show, :stream, :last_post]
|
before_action :authenticate_user!, except: [:show, :stream]
|
||||||
before_action :find_person, only: [:show, :stream, :hovercard]
|
before_action :find_person, only: [:show, :stream, :hovercard]
|
||||||
|
|
||||||
layout ->(c){ request.format == :mobile ? "application" : "with_header_with_footer" }
|
layout ->(c){ request.format == :mobile ? "application" : "with_header_with_footer" }
|
||||||
|
|
@ -128,12 +128,6 @@ class PeopleController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def last_post
|
|
||||||
@person = Person.find_from_guid_or_username(params)
|
|
||||||
last_post = Post.visible_from_author(@person, current_user).order('posts.created_at DESC').first
|
|
||||||
redirect_to post_path(last_post)
|
|
||||||
end
|
|
||||||
|
|
||||||
def retrieve_remote
|
def retrieve_remote
|
||||||
if params[:diaspora_handle]
|
if params[:diaspora_handle]
|
||||||
Webfinger.in_background(params[:diaspora_handle], :single_aspect_form => true)
|
Webfinger.in_background(params[:diaspora_handle], :single_aspect_form => true)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue