Some additions
This commit is contained in:
parent
4d857daf5d
commit
3a616b0b5e
@ -19,3 +19,10 @@ To regenerate docs simply run `bee generate docs`
|
|||||||
## Notes:
|
## Notes:
|
||||||
|
|
||||||
- Fixes have been placed into the beego orm for setting the timezone when using NewOrmWithDB()
|
- Fixes have been placed into the beego orm for setting the timezone when using NewOrmWithDB()
|
||||||
|
|
||||||
|
## Management tools
|
||||||
|
|
||||||
|
- create databases,
|
||||||
|
- run different migrations on template and system
|
||||||
|
- run migrations on all company tables (list, connect, migrate)
|
||||||
|
- generate password
|
||||||
|
@ -81,7 +81,7 @@ func (c *AuthController) Login() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if password != userCompanyMapping.PasswordHash { // TODO: Hash me
|
if !tokenTools.CheckPasswordHash(password, userCompanyMapping.PasswordHash) {
|
||||||
c.ServeJSONError("Email/Password incorrect")
|
c.ServeJSONError("Email/Password incorrect")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -77,14 +77,19 @@ func GetDatabase(tokenString string) (jwt.MapClaims, *sql.DB, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CreateDatabase Create a database by copying the template
|
// CreateDatabase Create a database by copying the template
|
||||||
func CreateDatabase(token string) {
|
func CreateDatabase(companyName string) {
|
||||||
/*
|
/*
|
||||||
db, err = sql.Open("postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company5 sslmode=disable")
|
if dbs[companyName] != nil {
|
||||||
if err != nil {
|
fmt.Println("DB Already open")
|
||||||
log.Fatal(err)
|
return dbs[companyName], nil
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
db, err = sql.Open("postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company5 sslmode=disable")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
or, err := orm.NewOrmWithDB("postgres", "temp", db)
|
or, err := orm.NewOrmWithDB("postgres", "temp", db)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user