This commit is contained in:
r888888888
2013-04-16 21:28:54 -07:00
parent 80cf4d2475
commit 677f102976
3 changed files with 12 additions and 2 deletions

View File

@@ -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?)

View File

@@ -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?)

View File

@@ -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