File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -777,11 +777,11 @@ func Routes() *web.Route {
777777 m .Group ("/notifications" , func () {
778778 m .Combo ("" ).
779779 Get (notify .ListNotifications ).
780- Put (notify . ReadNotifications , reqToken ())
780+ Put (reqToken (), notify . ReadNotifications )
781781 m .Get ("/new" , notify .NewAvailable )
782782 m .Combo ("/threads/{id}" ).
783783 Get (notify .GetThread ).
784- Patch (notify . ReadThread , reqToken ())
784+ Patch (reqToken (), notify . ReadThread )
785785 }, tokenRequiresScopes (auth_model .AccessTokenScopeCategoryNotification ))
786786
787787 // Users (requires user scope)
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
183183 if len (qLastRead ) > 0 {
184184 tmpLastRead , err := time .Parse (time .RFC3339 , qLastRead )
185185 if err != nil {
186- ctx .InternalServerError ( err )
186+ ctx .Error ( http . StatusBadRequest , "Parse" , err )
187187 return
188188 }
189189 if ! tmpLastRead .IsZero () {
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ func ReadNotifications(ctx *context.APIContext) {
132132 if len (qLastRead ) > 0 {
133133 tmpLastRead , err := time .Parse (time .RFC3339 , qLastRead )
134134 if err != nil {
135- ctx .InternalServerError ( err )
135+ ctx .Error ( http . StatusBadRequest , "Parse" , err )
136136 return
137137 }
138138 if ! tmpLastRead .IsZero () {
You can’t perform that action at this time.
0 commit comments