From 1fc600dd86a225c895430fd03ff276f02120ef71 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Wed, 13 Apr 2022 16:18:56 +1000 Subject: [PATCH] Update src/placeos-rest-api/controllers/users.cr Co-authored-by: Caspian Baska --- src/placeos-rest-api/controllers/users.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/placeos-rest-api/controllers/users.cr b/src/placeos-rest-api/controllers/users.cr index 7ca03760..ede8fe3d 100644 --- a/src/placeos-rest-api/controllers/users.cr +++ b/src/placeos-rest-api/controllers/users.cr @@ -50,7 +50,7 @@ module PlaceOS::Api lookup = params["id"] # NOTE:: remove after June 2023, added to help with 2022 user id migration - lookup = "user-#{lookup}" unless lookup.starts_with?("user-") + lookup = "#{Model::User.table_name}-#{lookup}" unless lookup.starts_with?("#{Model::User.table_name}-") # Index ordering to use for resolving the user. ordering = if lookup.is_email?