mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-16 22:12:53 +00:00
18 lines
347 B
Ruby
18 lines
347 B
Ruby
module Api
|
|
module V1
|
|
class GenresController < BaseController
|
|
skip_before_action :authenticate_api_token, only: [ :index, :show ]
|
|
|
|
def index
|
|
@genres = Genre.order(:name)
|
|
render json: @genres
|
|
end
|
|
|
|
def show
|
|
@genre = Genre.find(params[:id])
|
|
render json: @genre
|
|
end
|
|
end
|
|
end
|
|
end
|