Sha256: 8b9e53787be5169d4afdfcd5b397c94a15f06e8bfa1cd6f8f68def7420ece779
Contents?: true
Size: 647 Bytes
Versions: 13
Compression:
Stored size: 647 Bytes
Contents
class Api::V1::ApiController < ::ActionController::API before_action :authenticate_user private def authenticate_user #["current_user","current_token"] Make this true to check for email also @instance_hash = ::Arcadex.full_authentication(params,request,false) if @instance_hash.nil? render :json => {errors: "User is not logged in, register or log in"} , status: :unauthorized end end def current_user if !@instance_hash.nil? @instance_hash["current_user"] end end def current_token if !@instance_hash.nil? @instance_hash["current_token"] end end end
Version data entries
13 entries across 8 versions & 1 rubygems