/artists/banned, /favorites: fix redirects for non-html requests.

ref: https://danbooru.donmai.us/forum_topics/9127?page=287#forum_post_161549
This commit is contained in:
evazion
2019-12-11 02:14:00 -06:00
parent afea704b55
commit 99a1a408cd
2 changed files with 4 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ class ArtistsController < ApplicationController
end
def banned
redirect_to artists_path(search: { is_banned: "true", order: "updated_at" })
redirect_to artists_path(search: { is_banned: "true", order: "updated_at" }, format: request.format.symbol)
end
def ban

View File

@@ -7,11 +7,11 @@ class FavoritesController < ApplicationController
def index
if params[:user_id].present?
user = User.find(params[:user_id])
redirect_to posts_path(tags: "ordfav:#{user.name}")
redirect_to posts_path(tags: "ordfav:#{user.name}", format: request.format.symbol)
elsif CurrentUser.is_member?
redirect_to posts_path(tags: "ordfav:#{CurrentUser.name}")
redirect_to posts_path(tags: "ordfav:#{CurrentUser.name}", format: request.format.symbol)
else
redirect_to posts_path
redirect_to posts_path(format: request.format.symbol)
end
end