Tidy + timeline embetterment (#38)
* tidy up timelines a bit + stub out some endpoints * who's faved and who's boosted, reblog notifs * linting * Update progress with new endpoints
This commit is contained in:
@ -41,6 +41,8 @@ const (
|
||||
MaxIDKey = "max_id"
|
||||
// LimitKey is for specifying maximum number of notifications to return.
|
||||
LimitKey = "limit"
|
||||
// SinceIDKey is for specifying the minimum notification ID to return.
|
||||
SinceIDKey = "since_id"
|
||||
)
|
||||
|
||||
// Module implements the ClientAPIModule interface for every related to posting/deleting/interacting with notifications
|
||||
|
@ -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()})
|
||||
|
Reference in New Issue
Block a user