1
0

API Docs improvements (#46)

This commit is contained in:
konrad
2019-01-03 22:22:06 +00:00
committed by Gitea
parent 3183d10dbe
commit 607dbd6ae8
100 changed files with 1306 additions and 9201 deletions

View File

@ -24,7 +24,9 @@ import (
// PasswordReset holds the data to reset a password
type PasswordReset struct {
Token string `json:"token"`
// The previously issued reset token.
Token string `json:"token"`
// The new password for this user.
NewPassword string `json:"new_password"`
}
@ -76,7 +78,7 @@ func UserPasswordReset(reset *PasswordReset) (err error) {
// PasswordTokenRequest defines the request format for password reset resqest
type PasswordTokenRequest struct {
Email string `json:"email" valid:"email,length(0|250)"`
Email string `json:"email" valid:"email,length(0|250)" maxLength:"250"`
}
// RequestUserPasswordResetToken inserts a random token to reset a users password into the databsse