File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -783,11 +783,11 @@ func Routes(ctx gocontext.Context) *web.Route {
783
783
m .Group ("/notifications" , func () {
784
784
m .Combo ("" ).
785
785
Get (notify .ListNotifications ).
786
- Put (notify . ReadNotifications , reqToken ())
786
+ Put (reqToken (), notify . ReadNotifications )
787
787
m .Get ("/new" , notify .NewAvailable )
788
788
m .Combo ("/threads/{id}" ).
789
789
Get (notify .GetThread ).
790
- Patch (notify . ReadThread , reqToken ())
790
+ Patch (reqToken (), notify . ReadThread )
791
791
}, tokenRequiresScopes (auth_model .AccessTokenScopeCategoryNotification ))
792
792
793
793
// Users (requires user scope)
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ func ReadRepoNotifications(ctx *context.APIContext) {
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 () {
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ func ReadNotifications(ctx *context.APIContext) {
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 () {
You can’t perform that action at this time.
0 commit comments