mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 23:15:34 +08:00
15 lines
369 B
Ruby
15 lines
369 B
Ruby
module Api
|
|
module V1
|
|
class BaseController < ApiController
|
|
rescue_from ActionController::ParameterMissing do |e|
|
|
logger.error e.message
|
|
render json: {}, status: :bad_request
|
|
end
|
|
|
|
rescue_from ActiveRecord::RecordNotFound do |e|
|
|
logger.error e.message
|
|
render json: {}, status: :not_found
|
|
end
|
|
end
|
|
end
|
|
end
|