mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:52:26 -05:00
[performance] http response encoding / writing improvements (#2374)
This commit is contained in:
parent
d7e35f6bc9
commit
74700cc803
104 changed files with 526 additions and 267 deletions
|
|
@ -139,7 +139,7 @@ func (m *Module) MediaCreatePOSTHandler(c *gin.Context) {
|
|||
apiAttachment.URL = nil
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, apiAttachment)
|
||||
apiutil.JSON(c, http.StatusOK, apiAttachment)
|
||||
}
|
||||
|
||||
func validateCreateMedia(form *apimodel.AttachmentRequest) error {
|
||||
|
|
|
|||
|
|
@ -98,5 +98,5 @@ func (m *Module) MediaGETHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, attachment)
|
||||
apiutil.JSON(c, http.StatusOK, attachment)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ func (m *Module) MediaPUTHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, attachment)
|
||||
apiutil.JSON(c, http.StatusOK, attachment)
|
||||
}
|
||||
|
||||
func validateUpdateMedia(form *apimodel.AttachmentUpdateRequest) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue