mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 21:22:24 -05:00
more timeline stuff
This commit is contained in:
parent
5d65b6ca0a
commit
625e6d654c
7 changed files with 139 additions and 46 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
6
internal/api/model/timeline.go
Normal file
6
internal/api/model/timeline.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package model
|
||||
|
||||
type StatusTimelineResponse struct {
|
||||
Statuses []*Status
|
||||
LinkHeader string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue