skip api check for forum and comment endpoints

This commit is contained in:
Albert Yi
2017-01-10 15:06:34 -08:00
parent 63c218d71d
commit 8db970f9f3
3 changed files with 4 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ class CommentsController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :except => [:index, :search, :show]
rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception
skip_before_filter :api_check
def index
if params[:group_by] == "comment"

View File

@@ -3,7 +3,8 @@ class ForumPostsController < ApplicationController
before_filter :member_only, :except => [:index, :show]
before_filter :load_post, :only => [:edit, :show, :update, :destroy, :undelete]
before_filter :check_min_level, :only => [:edit, :show, :update, :destroy, :undelete]
skip_before_filter :api_check
def new
if params[:topic_id]
@forum_topic = ForumTopic.find(params[:topic_id])

View File

@@ -5,6 +5,7 @@ class ForumTopicsController < ApplicationController
before_filter :normalize_search, :only => :index
before_filter :load_topic, :only => [:edit, :show, :update, :destroy, :undelete, :new_merge, :create_merge, :subscribe, :unsubscribe]
before_filter :check_min_level, :only => [:show, :edit, :update, :new_merge, :create_merge, :destroy, :undelete, :subscribe, :unsubscribe]
skip_before_filter :api_check
def new
@forum_topic = ForumTopic.new