f129d9c49b
• Added: - LinkTimeline and PreviewCard fetching by id
18 lines
303 B
Ruby
18 lines
303 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::V1::LinksController < Api::BaseController
|
|
before_action :require_user!
|
|
before_action :set_link
|
|
|
|
def show
|
|
render json: @link, serializer: REST::PreviewCardSerializer
|
|
end
|
|
|
|
private
|
|
|
|
def set_link
|
|
@link = PreviewCard.find(params[:id])
|
|
end
|
|
|
|
end
|