mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-15 00:17:30 -06:00
[performance] add user cache and database (#879)
* go fmt * add + use user cache and database * fix import * update tests * remove unused relation
This commit is contained in:
parent
f7af7c061c
commit
56f53a2a6f
21 changed files with 490 additions and 70 deletions
|
|
@ -46,9 +46,9 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontend() {
|
|||
func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiStruct() {
|
||||
testAccount := suite.testAccounts["local_account_1"] // take zork for this test
|
||||
testEmoji := suite.testEmojis["rainbow"]
|
||||
|
||||
|
||||
testAccount.Emojis = []*gtsmodel.Emoji{testEmoji}
|
||||
|
||||
|
||||
apiAccount, err := suite.typeconverter.AccountToAPIAccountPublic(context.Background(), testAccount)
|
||||
suite.NoError(err)
|
||||
suite.NotNil(apiAccount)
|
||||
|
|
@ -61,9 +61,9 @@ func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiStruct()
|
|||
func (suite *InternalToFrontendTestSuite) TestAccountToFrontendWithEmojiIDs() {
|
||||
testAccount := suite.testAccounts["local_account_1"] // take zork for this test
|
||||
testEmoji := suite.testEmojis["rainbow"]
|
||||
|
||||
|
||||
testAccount.EmojiIDs = []string{testEmoji.ID}
|
||||
|
||||
|
||||
apiAccount, err := suite.typeconverter.AccountToAPIAccountPublic(context.Background(), testAccount)
|
||||
suite.NoError(err)
|
||||
suite.NotNil(apiAccount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue