mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[performance] http response encoding / writing improvements (#2374)
This commit is contained in:
@@ -83,5 +83,5 @@ func (m *Module) NotificationGETHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, resp)
|
||||
apiutil.JSON(c, http.StatusOK, resp)
|
||||
}
|
||||
|
@@ -75,5 +75,5 @@ func (m *Module) NotificationsClearPOSTHandler(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, struct{}{})
|
||||
apiutil.Data(c, http.StatusOK, apiutil.AppJSON, apiutil.EmptyJSONObject)
|
||||
}
|
||||
|
@@ -155,5 +155,6 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
|
||||
if resp.LinkHeader != "" {
|
||||
c.Header("Link", resp.LinkHeader)
|
||||
}
|
||||
c.JSON(http.StatusOK, resp.Items)
|
||||
|
||||
apiutil.JSON(c, http.StatusOK, resp.Items)
|
||||
}
|
||||
|
Reference in New Issue
Block a user