Properly load remote profiles

This commit is contained in:
Alex Gleason 2019-08-01 00:04:14 -04:00
parent 4d458d5778
commit 82ba2a7d5f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,12 @@ class Api::V1::AccountByUsernameController < Api::BaseController
end
def set_account
@account = Account.find_local!(params[:username])
user = "#{params[:username]}.#{params[:format]}".split("@")
if user[1]
@account = Account.find_remote!(user[0], user[1])
else
@account = Account.find_local!(user[0])
end
end
def check_account_suspension