fix: update Routes signature

This commit is contained in:
Derrick Hammer 2024-02-17 03:14:17 -05:00
parent af0f3e19de
commit 30b18a4ced
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ func (a AccountAPI) otpDisable(jc jape.Context) {
}
}
func (a AccountAPI) Routes() *httprouter.Router {
func (a AccountAPI) Routes() (*httprouter.Router, error) {
authMw2fa := authMiddleware(middleware.AuthMiddlewareOptions{
Identity: a.identity,
Accounts: a.accounts,
@ -215,5 +215,5 @@ func (a AccountAPI) Routes() *httprouter.Router {
"/api/auth/otp/verify": middleware.ApplyMiddlewares(a.otpVerify, authMw, middleware.ProxyMiddleware),
"/api/auth/otp/validate": middleware.ApplyMiddlewares(a.otpValidate, authMw, middleware.ProxyMiddleware),
"/api/auth/otp/disable": middleware.ApplyMiddlewares(a.otpDisable, authMw, middleware.ProxyMiddleware),
})
}), nil
}