From 677f102976d23eda7bcdb8364ed232da619c9389 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 16 Apr 2013 21:28:54 -0700 Subject: [PATCH] fixes #1287 --- app/controllers/post_appeals_controller.rb | 5 +++++ app/controllers/post_flags_controller.rb | 5 +++++ config/routes.rb | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/controllers/post_appeals_controller.rb b/app/controllers/post_appeals_controller.rb index 6c50afc57..ddf1fc646 100644 --- a/app/controllers/post_appeals_controller.rb +++ b/app/controllers/post_appeals_controller.rb @@ -23,6 +23,11 @@ class PostAppealsController < ApplicationController respond_with(@post_appeal) end + def show + @post_appeal = PostAppeal.find(params[:id]) + respond_with(@post_appeal) + end + private def check_privilege(post_appeal) raise User::PrivilegeError unless (post_appeal.creator_id == CurrentUser.id || CurrentUser.is_moderator?) diff --git a/app/controllers/post_flags_controller.rb b/app/controllers/post_flags_controller.rb index 63a1d6150..b7738bc74 100644 --- a/app/controllers/post_flags_controller.rb +++ b/app/controllers/post_flags_controller.rb @@ -23,6 +23,11 @@ class PostFlagsController < ApplicationController respond_with(@post_flag) end + def show + @post_flag = PostFlag.find(params[:id]) + respond_with(@post_flag) + end + private def check_privilege(post_flag) raise User::PrivilegeError unless (post_flag.creator_id == CurrentUser.id || CurrentUser.is_moderator?) diff --git a/config/routes.rb b/config/routes.rb index 1d0d41584..49c2d59bb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -144,8 +144,8 @@ Danbooru::Application.routes.draw do get :show_seq end end - resources :post_appeals, :only => [:new, :index, :create] - resources :post_flags, :only => [:new, :index, :create] + resources :post_appeals + resources :post_flags resources :post_versions, :only => [:index, :search] do collection do get :search