fix: get password as formvalue
This commit is contained in:
parent
0c255b0acf
commit
8278b74ae8
|
@ -31,6 +31,8 @@ func (handler ProsodyHandler) Post(c *fiber.Ctx) error {
|
|||
if err := c.BodyParser(&req); err != nil {
|
||||
return RenderError(c, fmt.Errorf(" c.BodyParser(&req): %w", err), defaultErrMessage)
|
||||
}
|
||||
req.CurrentPassword = c.FormValue("current_password")
|
||||
req.NewPassword = c.FormValue("new_password")
|
||||
if err := handler.prosodyService.ChangePassword(req.User, req.CurrentPassword, req.NewPassword); err != nil {
|
||||
// for _, ip := range c.IPs() {
|
||||
// handler.fail2banSrv.FailedAttempt(ip)
|
||||
|
|
Loading…
Reference in New Issue