mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 00:55:59 +08:00
demo
This commit is contained in:
@@ -6,6 +6,7 @@ type Register struct {
|
||||
Account string `gorm:"column:account;primary_key;type:char(255)" json:"account"`
|
||||
Password string `gorm:"column:password;type:varchar(255)" json:"password"`
|
||||
Ex string `gorm:"column:ex;size:1024" json:"ex"`
|
||||
UserID string `gorm:"column:user_id;type:varchar(255)" json:"userID"`
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -15,11 +15,12 @@ func GetRegister(account string) (*db.Register, error) {
|
||||
account).Take(&r).Error
|
||||
}
|
||||
|
||||
func SetPassword(account, password, ex string) error {
|
||||
func SetPassword(account, password, ex, userID string) error {
|
||||
r := db.Register{
|
||||
Account: account,
|
||||
Password: password,
|
||||
Ex: ex,
|
||||
UserID: userID,
|
||||
}
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user