From d13cfec3b576562a55727bf046eba148eff4fcfd Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 2 Jul 2023 00:30:52 -0700 Subject: [PATCH] Usernames in URLs should not be case-sensitive 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