media handling

This commit is contained in:
tsmethurst
2021-04-09 17:21:53 +02:00
parent f210d39891
commit a30a1a267b
8 changed files with 431 additions and 1 deletions

View File

@ -61,6 +61,12 @@ func StandardDBSetup(db db.DB) error {
}
}
for _, v := range TestAttachments() {
if err := db.Put(v); err != nil {
return err
}
}
for _, v := range TestStatuses() {
if err := db.Put(v); err != nil {
return err

View File

@ -440,6 +440,14 @@ func TestAccounts() map[string]*gtsmodel.Account {
return accounts
}
func TestAttachments() map[string]*gtsmodel.MediaAttachment {
return map[string]*gtsmodel.MediaAttachment{
"admin_account_status_1": {
},
}
}
func TestStatuses() map[string]*gtsmodel.Status {
return map[string]*gtsmodel.Status{
"admin_account_status_1": {