secret token thanks to @HarlyquinForest

This commit is contained in:
MHSanaei
2023-04-21 19:00:14 +03:30
parent 6bebde4105
commit b0f974a94d
16 changed files with 314 additions and 67 deletions

View File

@@ -27,8 +27,9 @@ func initUser() error {
}
if count == 0 {
user := &model.User{
Username: "admin",
Password: "admin",
Username: "admin",
Password: "admin",
LoginSecret: "",
}
return db.Create(user).Error
}

View File

@@ -18,9 +18,10 @@ const (
)
type User struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
Username string `json:"username"`
Password string `json:"password"`
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
Username string `json:"username"`
Password string `json:"password"`
LoginSecret string `json:"loginSecret"`
}
type Inbound struct {