diff options
author | 2022-10-14 17:30:04 +0200 | |
---|---|---|
committer | 2022-10-14 17:30:04 +0200 | |
commit | f7416d6e941df6fe016d66bb5b53d633775c1f6f (patch) | |
tree | 086ee8e0de19ce6f2b8ed8e04ecae3848544b48f /internal/db/emoji.go | |
parent | [feature] Add `/api/v1/admin/custom_emojis/{id}` endpoint for single emoji GE... (diff) | |
download | gotosocial-f7416d6e941df6fe016d66bb5b53d633775c1f6f.tar.xz |
[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
Diffstat (limited to 'internal/db/emoji.go')
-rw-r--r-- | internal/db/emoji.go | 2 |
1 files changed, 2 insertions, 0 deletions
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. |