demo modify

This commit is contained in:
Gordon
2022-02-11 17:44:02 +08:00
parent 6a8a0f2249
commit fd59cc6226
5 changed files with 7 additions and 22 deletions
-4
View File
@@ -293,10 +293,6 @@ type config struct {
SmtpAddr string `yaml:"smtpAddr"`
SmtpPort int `yaml:"smtpPort"`
}
ErrMsg struct {
HasRegistered string `yaml:"hasRegistered"`
MailSendCodeErr string `yaml:"mailSendCodeErr"`
}
}
}
type PConversation struct {
@@ -14,10 +14,11 @@ func GetRegister(account string) (*db.Register, error) {
return &r, dbConn.Table("registers").Where("account = ?",
account).Take(&r).Error
}
func SetPassword(account, password string) error {
func SetPassword(account, password, ex string) error {
r := db.Register{
Account: account,
Password: password,
Ex: ex,
}
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {