loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix bugs related to notification endpoints (#25548)

authored by

Zettat123 and committed by
GitHub
defd8070 fdab4e3d

+4 -4
+2 -2
routers/api/v1/api.go
··· 777 777 m.Group("/notifications", func() { 778 778 m.Combo(""). 779 779 Get(notify.ListNotifications). 780 - Put(notify.ReadNotifications, reqToken()) 780 + Put(reqToken(), notify.ReadNotifications) 781 781 m.Get("/new", notify.NewAvailable) 782 782 m.Combo("/threads/{id}"). 783 783 Get(notify.GetThread). 784 - Patch(notify.ReadThread, reqToken()) 784 + Patch(reqToken(), notify.ReadThread) 785 785 }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryNotification)) 786 786 787 787 // Users (requires user scope)
+1 -1
routers/api/v1/notify/repo.go
··· 183 183 if len(qLastRead) > 0 { 184 184 tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) 185 185 if err != nil { 186 - ctx.InternalServerError(err) 186 + ctx.Error(http.StatusBadRequest, "Parse", err) 187 187 return 188 188 } 189 189 if !tmpLastRead.IsZero() {
+1 -1
routers/api/v1/notify/user.go
··· 132 132 if len(qLastRead) > 0 { 133 133 tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) 134 134 if err != nil { 135 - ctx.InternalServerError(err) 135 + ctx.Error(http.StatusBadRequest, "Parse", err) 136 136 return 137 137 } 138 138 if !tmpLastRead.IsZero() {