more timeline stuff

This commit is contained in:
tsmethurst 2021-06-07 20:20:36 +02:00
commit 625e6d654c
7 changed files with 139 additions and 46 deletions

View file

@ -87,12 +87,13 @@ func (m *Module) HomeTimelineGETHandler(c *gin.Context) {
local = i
}
statuses, errWithCode := m.processor.HomeTimelineGet(authed, maxID, sinceID, minID, limit, local)
resp, errWithCode := m.processor.HomeTimelineGet(authed, maxID, sinceID, minID, limit, local)
if errWithCode != nil {
l.Debugf("error from processor account statuses get: %s", errWithCode)
l.Debugf("error from processor HomeTimelineGet: %s", errWithCode)
c.JSON(errWithCode.Code(), gin.H{"error": errWithCode.Safe()})
return
}
c.JSON(http.StatusOK, statuses)
c.Header("Link", resp.LinkHeader)
c.JSON(http.StatusOK, resp.Statuses)
}

View file

@ -0,0 +1,6 @@
package model
type StatusTimelineResponse struct {
Statuses []*Status
LinkHeader string
}