Account.find_acct! function

This commit is contained in:
Alex Gleason
2019-11-17 19:54:18 -06:00
parent 0aed68a7e3
commit a7955ad491
2 changed files with 10 additions and 6 deletions

View File

@@ -11,12 +11,7 @@ class Api::V1::AccountByUsernameController < Api::BaseController
end
def set_account
username, domain = params[:username].split("@")
if domain
@account = Account.find_remote!(username, domain)
else
@account = Account.find_local!(username)
end
@account = Account.find_acct!(params[:username])
end
def check_account_suspension