You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
###############################################################################################getteruser : Model::Userdolookup=params["id"]# TODO: Remove user id query prefixing.# Remove after June 2023, added to help with 2022 user id migrationlookup="#{Model::User.table_name}-#{lookup}"unlesslookup.starts_with?("#{Model::User.table_name}-")# Index ordering to use for resolving the user.ordering=iflookup.is_email?{:email,:login_name}else{:id,:login_name,:staff_id}endauthority=current_user.authority_id.as(String)ordering.each.compact_mapdo |id_type|
caseid_typewhen:idModel::User.find(lookup)when:emailModel::User.find_by_email(authority_id: authority,email: lookup)when:login_nameModel::User.find_by_login_name(authority_id: authority,login_name: lookup)when:staff_idModel::User.find_by_staff_id(authority_id: authority,staff_id: lookup)endend.firstdo# 404 if the `User` was not foundraiseRethinkORM::Error::DocumentNotFound.newend.tapdo |user|
Log.context.set(user_id: user.id)endend################################################################################################ Render the current userget("/current",:current)do
The text was updated successfully, but these errors were encountered:
Remove after June 2023, added to help with 2022 user id migration
Render the current user
rest-api/src/placeos-rest-api/controllers/users.cr
Line 52 in 7f00c95
The text was updated successfully, but these errors were encountered: