✨ Cached attachments
This commit is contained in:
parent
ed578ec315
commit
9986fb0b9c
@ -67,7 +67,10 @@ func NewServer() {
|
|||||||
api.Get("/users/:accountId/follow", auth, getAccountFollowed)
|
api.Get("/users/:accountId/follow", auth, getAccountFollowed)
|
||||||
api.Post("/users/:accountId/follow", auth, doFollowAccount)
|
api.Post("/users/:accountId/follow", auth, doFollowAccount)
|
||||||
|
|
||||||
api.Get("/attachments/o/:fileId", openAttachment)
|
api.Get("/attachments/o/:fileId", cache.New(cache.Config{
|
||||||
|
Expiration: 365 * 24 * time.Hour,
|
||||||
|
CacheControl: true,
|
||||||
|
}), openAttachment)
|
||||||
api.Post("/attachments", auth, uploadAttachment)
|
api.Post("/attachments", auth, uploadAttachment)
|
||||||
|
|
||||||
api.Get("/posts", listPost)
|
api.Get("/posts", listPost)
|
||||||
|
Loading…
Reference in New Issue
Block a user