Change password reset endpoint to /admin/user/{Username}/passphrase

Ref T695
This commit is contained in:
Matt Baer 2019-11-11 16:02:22 +09:00
parent aa9efc7b37
commit 6e09fcb9e2
2 changed files with 2 additions and 2 deletions

View file

@ -144,7 +144,7 @@ func InitRoutes(apper Apper, r *mux.Router) *mux.Router {
write.HandleFunc("/admin", handler.Admin(handleViewAdminDash)).Methods("GET")
write.HandleFunc("/admin/users", handler.Admin(handleViewAdminUsers)).Methods("GET")
write.HandleFunc("/admin/user/{username}", handler.Admin(handleViewAdminUser)).Methods("GET")
write.HandleFunc("/admin/user/{username}", handler.Admin(handleAdminResetUserPass)).Methods("POST")
write.HandleFunc("/admin/user/{username}/passphrase", handler.Admin(handleAdminResetUserPass)).Methods("POST")
write.HandleFunc("/admin/pages", handler.Admin(handleViewAdminPages)).Methods("GET")
write.HandleFunc("/admin/page/{slug}", handler.Admin(handleViewAdminPage)).Methods("GET")
write.HandleFunc("/admin/update/config", handler.AdminApper(handleAdminUpdateConfig)).Methods("POST")

View file

@ -62,7 +62,7 @@ button[type="submit"].danger {
<th>Password</th>
<td>
{{if not .OwnUserPage}}
<form id="reset-form" action="/admin/user/{{.User.Username}}" method="post" autocomplete="false">
<form id="reset-form" action="/admin/user/{{.User.Username}}/passphrase" method="post" autocomplete="false">
<input type="hidden" name="user" value="{{.User.ID}}"/>
<button
class="danger"