mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] PATCH /api/v1/admin/custom_emojis/{id}
endpoint (#1061)
* start adding admin emoji PATCH stuff * updating works OK, now how about copying * allow emojis to be copied * update swagger docs * update admin processer to use non-interface storage driver * remove shortcode updating for local emojis * go fmt Co-authored-by: f0x52 <f0x@cthu.lu>
This commit is contained in:
@@ -54,3 +54,28 @@ type EmojiCreateRequest struct {
|
||||
// CategoryName length should not exceed 64 characters.
|
||||
CategoryName string `form:"category"`
|
||||
}
|
||||
|
||||
// EmojiUpdateRequest represents a request to update a custom emoji, made through the admin API.
|
||||
//
|
||||
// swagger:model emojiUpdateRequest
|
||||
type EmojiUpdateRequest struct {
|
||||
// Type of action. One of disable, modify, copy.
|
||||
Type EmojiUpdateType `form:"type" json:"type" xml:"type"`
|
||||
// Desired shortcode for the emoji, without surrounding colons. This must be unique for the domain.
|
||||
// example: blobcat_uwu
|
||||
Shortcode *string `form:"shortcode"`
|
||||
// Image file to use for the emoji.
|
||||
// Must be png or gif and no larger than 50kb.
|
||||
Image *multipart.FileHeader `form:"image"`
|
||||
// Category in which to place the emoji.
|
||||
CategoryName *string `form:"category"`
|
||||
}
|
||||
|
||||
// EmojiUpdateType models an admin update action to take on a custom emoji.
|
||||
type EmojiUpdateType string
|
||||
|
||||
const (
|
||||
EmojiUpdateModify EmojiUpdateType = "modify" // modify local emoji
|
||||
EmojiUpdateDisable EmojiUpdateType = "disable" // disable remote emoji
|
||||
EmojiUpdateCopy EmojiUpdateType = "copy" // copy remote emoji -> local
|
||||
)
|
||||
|
Reference in New Issue
Block a user