[feature] implement custom_emojis endpoint (#563)

* implement custom_emojis api endpoint

* add tests for getting custom emoji out of the database and converting to api emoji

* change sort direction of emoji query

* change logging level and initialize array with known length as per kim's suggestions

* add continue to lessen risk of making a malformed struct during conversion from db to api emojis
This commit is contained in:
Adelie Paull 2022-05-20 04:34:36 -04:00 committed by GitHub
commit caa0cde0e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 231 additions and 1 deletions

View file

@ -77,6 +77,7 @@ type bunDBService struct {
db.Admin
db.Basic
db.Domain
db.Emoji
db.Instance
db.Media
db.Mention
@ -168,6 +169,9 @@ func NewBunDBService(ctx context.Context) (db.DB, error) {
Domain: &domainDB{
conn: conn,
},
Emoji: &emojiDB{
conn: conn,
},
Instance: &instanceDB{
conn: conn,
},