Move check_api_readable to api_controller

It's easier to skip the check in the two places that we need to, and
include it by default everywhere else.
This commit is contained in:
Andy Allan 2024-05-29 14:54:16 +01:00
parent 0bbfe922ea
commit c1cccd40fc
17 changed files with 5 additions and 18 deletions

View file

@ -1,6 +1,5 @@
module Api
class WaysController < ApiController
before_action :check_api_readable
before_action :check_api_writable, :only => [:create, :update, :delete]
before_action :authorize, :only => [:create, :update, :delete]