Commit 263ef3ef authored by Rob Colbert's avatar Rob Colbert

Merge branch 'develop' of https://code.gab.com/gab/social/gab-social into develop

parents 7f3b77f8 b9f9ae22
......@@ -11,12 +11,11 @@ class Api::V1::AccountByUsernameController < Api::BaseController
end
def set_account
user = params[:username].split("@")
if user[1]
user[1] = "#{user[1]}.#{params[:format]}"
@account = Account.find_remote!(user[0], user[1])
username, domain = params[:username].split("@")
if domain
@account = Account.find_remote!(username, domain)
else
@account = Account.find_local!(user[0])
@account = Account.find_local!(username)
end
end
......
......@@ -330,7 +330,7 @@ Rails.application.routes.draw do
get '/search', to: 'search#index', as: :search
get '/account_by_username/:username', to: 'account_by_username#show'
get '/account_by_username/:username', to: 'account_by_username#show', username: /(.*)/
resources :follows, only: [:create]
resources :media, only: [:create, :update]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment