From f7416d6e941df6fe016d66bb5b53d633775c1f6f Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:30:04 +0200 Subject: [feature] Add emoji DELETE handler at `/api/v1/admin/custom_emojis` (#913) * add emoji DELETE handler * no need to process error (thanks kim) * don't double check if user is admin * add missing security annotation --- internal/db/emoji.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/db/emoji.go') diff --git a/internal/db/emoji.go b/internal/db/emoji.go index 831629232..d2f66a377 100644 --- a/internal/db/emoji.go +++ b/internal/db/emoji.go @@ -35,6 +35,8 @@ type Emoji interface { // UpdateEmoji updates the given columns of one emoji. // If no columns are specified, every column is updated. UpdateEmoji(ctx context.Context, emoji *gtsmodel.Emoji, columns ...string) (*gtsmodel.Emoji, Error) + // DeleteEmojiByID deletes one emoji by its database ID. + DeleteEmojiByID(ctx context.Context, id string) Error // GetUseableEmojis gets all emojis which are useable by accounts on this instance. GetUseableEmojis(ctx context.Context) ([]*gtsmodel.Emoji, Error) // GetEmojis gets emojis based on given parameters. Useful for admin actions. -- cgit v1.2.3