From 568a405ce43834d5b4da3ff81f1e8a6972db802b Mon Sep 17 00:00:00 2001 From: Bryce Johnson Date: Tue, 11 Oct 2016 18:28:00 +0200 Subject: Add exists to users routes and fix endpoint. --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1aa22995692..6a881b271d7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -86,7 +86,7 @@ class UsersController < ApplicationController end def exists - render json: { exists: !Namespace.where(name: params[:username]).nil? } + render json: { exists: Namespace.where(path: params[:username].downcase).any? } end private -- cgit v1.2.1