From 8a49948af14dfff660762a64c5e90b64bf521341 Mon Sep 17 00:00:00 2001 From: Prommah Date: Fri, 29 Sep 2017 22:43:14 +0200 Subject: [PATCH] Fix users API when nothing found --- app/controllers/api/v1/users_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 6c02b0b..fe4f7af 100755 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -14,7 +14,8 @@ class Api::V1::UsersController < Api::V1::BaseController end if @user.nil? - raise ActionController::RoutingError.new("User Not Found") + render json: nil + return end if @user.steamid.present?