ぼざクリ タグ広場 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.
 
 
 
 
 
 

15 lines
323 B

  1. class ApplicationController < ActionController::API
  2. before_action :authenticate_user
  3. def current_user
  4. @current_user
  5. end
  6. private
  7. def authenticate_user
  8. code = request.headers['X-Transfer-Code'] || request.headers['HTTP_X_TRANSFER_CODE']
  9. @current_user = User.find_by(inheritance_code: code)
  10. end
  11. end