Class: Api::V5::UserRestaurantHistoriesController

Inherits:
BaseController
  • Object
show all
Includes:
Concerns::Authorization
Defined in:
app/controllers/api/v5/user_restaurant_histories_controller.rb

Overview

API for user restaurant history, only need bearer token

Constant Summary

Constants inherited from BaseController

BaseController::CACHE_NAMESPACE, BaseController::INTERNAL_SERVER_ERROR_MESSAGE, BaseController::ResponseSchema

Instance Method Summary collapse

Methods inherited from BaseController

#identity_cache_memoization

Methods included from LogrageCustomLogger

#append_info_to_payload

Methods included from ResponseCacheConcern

#my_response_cache

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
# File 'app/controllers/api/v5/user_restaurant_histories_controller.rb', line 6

def index
  render json: ActiveModelSerializers::SerializableResource.new(
    @data,
    { serialization_context: serialization_context,
      each_serializer: Api::V5::RestaurantSerializer,
      adapter: :json_api }
  ).serializable_hash.merge(success: true, message: nil).as_json
end