fix: routes need http verbs
This commit is contained in:
parent
1a9fa9c4be
commit
ee2f7331eb
|
@ -215,11 +215,11 @@ func (a AccountAPI) Routes() (*httprouter.Router, error) {
|
||||||
})
|
})
|
||||||
|
|
||||||
return jape.Mux(map[string]jape.Handler{
|
return jape.Mux(map[string]jape.Handler{
|
||||||
"/api/auth/login": middleware.ApplyMiddlewares(a.login, authMw2fa, middleware.ProxyMiddleware),
|
"POST /api/auth/login": middleware.ApplyMiddlewares(a.login, authMw2fa, middleware.ProxyMiddleware),
|
||||||
"/api/auth/register": a.register,
|
"POST /api/auth/register": a.register,
|
||||||
"/api/auth/otp/generate": middleware.ApplyMiddlewares(a.otpGenerate, authMw, middleware.ProxyMiddleware),
|
"GET /api/auth/otp/generate": middleware.ApplyMiddlewares(a.otpGenerate, authMw, middleware.ProxyMiddleware),
|
||||||
"/api/auth/otp/verify": middleware.ApplyMiddlewares(a.otpVerify, authMw, middleware.ProxyMiddleware),
|
"POST /api/auth/otp/verify": middleware.ApplyMiddlewares(a.otpVerify, authMw, middleware.ProxyMiddleware),
|
||||||
"/api/auth/otp/validate": middleware.ApplyMiddlewares(a.otpValidate, authMw, middleware.ProxyMiddleware),
|
"POST /api/auth/otp/validate": middleware.ApplyMiddlewares(a.otpValidate, authMw, middleware.ProxyMiddleware),
|
||||||
"/api/auth/otp/disable": middleware.ApplyMiddlewares(a.otpDisable, authMw, middleware.ProxyMiddleware),
|
"POST /api/auth/otp/disable": middleware.ApplyMiddlewares(a.otpDisable, authMw, middleware.ProxyMiddleware),
|
||||||
}), nil
|
}), nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue