[performance] http response encoding / writing improvements (#2374)

This commit is contained in:
kim 2023-11-27 14:00:57 +00:00 committed by GitHub
commit 74700cc803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 526 additions and 267 deletions

View file

@ -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 {

View file

@ -98,5 +98,5 @@ func (m *Module) MediaGETHandler(c *gin.Context) {
return
}
c.JSON(http.StatusOK, attachment)
apiutil.JSON(c, http.StatusOK, attachment)
}

View file

@ -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 {