Added reset password route
This commit is contained in:
@@ -18,16 +18,14 @@ func Init() error {
|
||||
// port := config.AppConfig.Database.Port
|
||||
dbName := config.AppConfig.Database.DatabaseName
|
||||
password := config.AppConfig.Database.Password
|
||||
|
||||
|
||||
dbString := fmt.Sprintf("host=%s user=%s dbname=%s sslmode=disable password=%s", host, user, dbName, password)
|
||||
// db, err = gorm.Open("postgres", "host=localhost user=postgres dbname=postgres sslmode=disable password=root")
|
||||
var err error
|
||||
|
||||
|
||||
// //PostgreSQL
|
||||
db, err = gorm.Open("postgres", dbString)
|
||||
|
||||
|
||||
db.LogMode(true)
|
||||
|
||||
if err != nil {
|
||||
@@ -35,9 +33,9 @@ func Init() error {
|
||||
return err
|
||||
}
|
||||
//TODO AUTOMIGRATE models once we have them
|
||||
db.AutoMigrate(&models.User{}, &models.Company{}, &models.Device{}, &models.DeviceInfo{},
|
||||
db.AutoMigrate(&models.User{}, &models.Company{}, &models.Device{}, &models.DeviceInfo{},
|
||||
&models.Contract{}, &models.ContractInfo{},
|
||||
&models.ProductTemplate{}, &models.TextTemplate{}, &models.Invoice{}, &models.InvoiceItem{}, &models.Notification{} )
|
||||
&models.ProductTemplate{}, &models.TextTemplate{}, &models.Invoice{}, &models.InvoiceItem{}, &models.Notification{}, models.PasswordTokens{})
|
||||
|
||||
return nil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user