mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 03:08:07 -06:00
restructuring federator
This commit is contained in:
parent
d9da0022e1
commit
b777a682fe
15 changed files with 410 additions and 195 deletions
|
|
@ -274,7 +274,7 @@ func (suite *AccountCreateTestSuite) TestAccountCreatePOSTHandlerSuccessful() {
|
|||
|
||||
// 1. we should be able to get the new account from the db
|
||||
acct := >smodel.Account{}
|
||||
err = suite.db.GetWhere("username", "test_user", acct)
|
||||
err = suite.db.GetLocalAccountByUsername("test_user", acct)
|
||||
assert.NoError(suite.T(), err)
|
||||
assert.NotNil(suite.T(), acct)
|
||||
// 2. reason should be set
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ func (m *FileServer) serveEmoji(c *gin.Context, accountID string, mediaType stri
|
|||
|
||||
// make sure the instance account id owns the requested emoji
|
||||
instanceAccount := >smodel.Account{}
|
||||
if err := m.db.GetWhere("username", m.config.Host, instanceAccount); err != nil {
|
||||
if err := m.db.GetLocalAccountByUsername(m.config.Host, instanceAccount); err != nil {
|
||||
l.Debugf("error fetching instance account: %s", err)
|
||||
c.String(http.StatusNotFound, "404 page not found")
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue