ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
476 B

  1. class DeerjikistsController < ApplicationController
  2. def show
  3. platform = params[:platform].to_s.strip
  4. code = params[:code].to_s.strip
  5. return head :bad_request if platform.blank? || code.blank?
  6. deerjikist = Deerjikist
  7. .joins(:tag)
  8. .includes(:tag, tag: :tag_name)
  9. .find_by(platform:, code:)
  10. if deerjikist
  11. render json: DeerjikistRepr.base(deerjikist)
  12. else
  13. head :not_found
  14. end
  15. end
  16. end