Api to check valid user login
# File app/controllers/mobile_app_api/v1/base_controller.rb, line 10 def login_required! User.current = nil unless params[:auth_token].blank? @user = User.find_by(auth_token: params[:auth_token]) if @user User.current = @user else render json: { status: 400, error: "Invalid user. Login and try again." } end else render json: { status: 400, error: "Auth token not found in request." } end end