tidy up timelines a bit + stub out some endpoints

This commit is contained in:
tsmethurst 2021-05-30 15:32:29 +02:00
commit 69e7a89549
20 changed files with 482 additions and 11 deletions

View file

@ -62,7 +62,13 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
maxID = maxIDString
}
notifs, errWithCode := m.processor.NotificationsGet(authed, limit, maxID)
sinceID := ""
sinceIDString := c.Query(SinceIDKey)
if sinceIDString != "" {
sinceID = sinceIDString
}
notifs, errWithCode := m.processor.NotificationsGet(authed, limit, maxID, sinceID)
if errWithCode != nil {
l.Debugf("error processing notifications get: %s", errWithCode.Error())
c.JSON(errWithCode.Code(), gin.H{"error": errWithCode.Safe()})