Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
123456789101112131415161718192021222324252627class Api::V4::RunnersController < Api::V4::ApplicationController before_action :set_runner, only: %i[show] before_action :set_user, only: %i[me]
def index if params[:search].blank? render status: :bad_request, json: {status: 400, message: 'You must supply a `search` term.'} return end @runners = User.search(params[:search]) render json: Api::V4::UserBlueprint.render(@runners, root: :runners) end
def show render json: Api::V4::UserBlueprint.render(@runner, root: :runner) end
def me if current_user.nil? head :unauthorized return end
render json: Api::V4::UserBlueprint.render(current_user, root: :runner) endend