fixes #1287
This commit is contained in:
@@ -23,6 +23,11 @@ class PostAppealsController < ApplicationController
|
|||||||
respond_with(@post_appeal)
|
respond_with(@post_appeal)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@post_appeal = PostAppeal.find(params[:id])
|
||||||
|
respond_with(@post_appeal)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check_privilege(post_appeal)
|
def check_privilege(post_appeal)
|
||||||
raise User::PrivilegeError unless (post_appeal.creator_id == CurrentUser.id || CurrentUser.is_moderator?)
|
raise User::PrivilegeError unless (post_appeal.creator_id == CurrentUser.id || CurrentUser.is_moderator?)
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ class PostFlagsController < ApplicationController
|
|||||||
respond_with(@post_flag)
|
respond_with(@post_flag)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@post_flag = PostFlag.find(params[:id])
|
||||||
|
respond_with(@post_flag)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def check_privilege(post_flag)
|
def check_privilege(post_flag)
|
||||||
raise User::PrivilegeError unless (post_flag.creator_id == CurrentUser.id || CurrentUser.is_moderator?)
|
raise User::PrivilegeError unless (post_flag.creator_id == CurrentUser.id || CurrentUser.is_moderator?)
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ Danbooru::Application.routes.draw do
|
|||||||
get :show_seq
|
get :show_seq
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :post_appeals, :only => [:new, :index, :create]
|
resources :post_appeals
|
||||||
resources :post_flags, :only => [:new, :index, :create]
|
resources :post_flags
|
||||||
resources :post_versions, :only => [:index, :search] do
|
resources :post_versions, :only => [:index, :search] do
|
||||||
collection do
|
collection do
|
||||||
get :search
|
get :search
|
||||||
|
|||||||
Reference in New Issue
Block a user