@@ -277,15 +277,9 @@ func RegisterRoutes(m *web.Route) {
277
277
m .Get ("/{provider}" , auth .SignInOAuth )
278
278
m .Get ("/{provider}/callback" , auth .SignInOAuthCallback )
279
279
})
280
- m .Group ("/link_account" , func () {
281
- m .Get ("" , auth .LinkAccount )
282
- }, openIDSignInEnabled )
283
- m .Group ("/link_account_signin" , func () {
284
- m .Post ("" , bindIgnErr (forms.SignInForm {}), auth .LinkAccountPostSignIn )
285
- }, openIDSignInEnabled )
286
- m .Group ("/link_account_signup" , func () {
287
- m .Post ("" , bindIgnErr (forms.RegisterForm {}), auth .LinkAccountPostRegister )
288
- }, openIDSignUpEnabled )
280
+ m .Get ("/link_account" , openIDSignInEnabled , auth .LinkAccount )
281
+ m .Post ("/link_account_signin" , openIDSignInEnabled , bindIgnErr (forms.SignInForm {}), auth .LinkAccountPostSignIn )
282
+ m .Post ("/link_account_signup" , openIDSignUpEnabled , bindIgnErr (forms.RegisterForm {}), auth .LinkAccountPostRegister )
289
283
m .Group ("/two_factor" , func () {
290
284
m .Get ("" , auth .TwoFactor )
291
285
m .Post ("" , bindIgnErr (forms.TwoFactorAuthForm {}), auth .TwoFactorPost )
@@ -348,9 +342,7 @@ func RegisterRoutes(m *web.Route) {
348
342
m .Post ("/delete" , security .DeleteOpenID )
349
343
m .Post ("/toggle_visibility" , security .ToggleOpenIDVisibility )
350
344
}, openIDSignInEnabled )
351
- m .Group ("/account_link" , func () {
352
- m .Post ("" , security .DeleteAccountLink )
353
- }, openIDSignInEnabled )
345
+ m .Post ("/account_link" , openIDSignInEnabled , security .DeleteAccountLink )
354
346
})
355
347
m .Group ("/applications/oauth2" , func () {
356
348
m .Get ("/{id}" , user_setting .OAuth2ApplicationShow )
0 commit comments