31 lines
507 B
Go
31 lines
507 B
Go
package request
|
|
|
|
import "errors"
|
|
|
|
type ChangePasswordRequest struct {
|
|
BaseRequest
|
|
OldPassword string
|
|
NewPassword string
|
|
}
|
|
|
|
// 签名验证
|
|
func (request *ChangePasswordRequest) CheckParameter() (err error) {
|
|
|
|
if len(request.AccessToken) == 0 {
|
|
err = errors.New("AccessToken不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.OldPassword) == 0 {
|
|
err = errors.New("OldPassword不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.NewPassword) == 0 {
|
|
err = errors.New("NewPassword不能为空")
|
|
return
|
|
}
|
|
|
|
return
|
|
}
|