From 3104990de92c616c8294567e806062c977a0cbe5 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 2 Jul 2023 00:31:11 -0700 Subject: [PATCH] Usernames in URLs should not be case-sensitive (#113) Amateur hour mistake --- app/controllers/api/v1/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index d290c93..3f973e6 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -171,7 +171,7 @@ module Api # Specify whitelisted properties that can be modified. def set - @user = User.where('username = ?', params[:id]).first + @user = User.where('username = ?', params[:id].downcase).first end def set_by_id