mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 10:27:30 -06:00
Started working on emoji
This commit is contained in:
parent
2e7ac10d00
commit
9826f3f6d9
16 changed files with 75 additions and 14 deletions
|
|
@ -36,6 +36,10 @@ const (
|
|||
mediaTypeKey = "media_type"
|
||||
mediaSizeKey = "media_size"
|
||||
fileNameKey = "file_name"
|
||||
shortcodeKey = "shortcode"
|
||||
|
||||
emojisPath = "emojis"
|
||||
filesPath = "files"
|
||||
)
|
||||
|
||||
// fileServer implements the RESTAPIModule interface.
|
||||
|
|
@ -62,6 +66,7 @@ func New(config *config.Config, db db.DB, storage storage.Storage, log *logrus.L
|
|||
// Route satisfies the RESTAPIModule interface
|
||||
func (m *fileServer) Route(s router.Router) error {
|
||||
s.AttachHandler(http.MethodGet, fmt.Sprintf("%s/:%s/:%s/:%s/:%s", m.storageBase, accountIDKey, mediaTypeKey, mediaSizeKey, fileNameKey), m.ServeFile)
|
||||
s.AttachHandler(http.MethodGet, fmt.Sprintf("%s/:%s/:%s/:%s/:%s", m.storageBase, accountIDKey, mediaTypeKey, mediaSizeKey, fileNameKey), m.serveEmoji)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue