Some additions
This commit is contained in:
parent
4d857daf5d
commit
3a616b0b5e
@ -19,3 +19,10 @@ To regenerate docs simply run `bee generate docs`
|
||||
## Notes:
|
||||
|
||||
- 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
|
||||
}
|
||||
|
||||
if password != userCompanyMapping.PasswordHash { // TODO: Hash me
|
||||
if !tokenTools.CheckPasswordHash(password, userCompanyMapping.PasswordHash) {
|
||||
c.ServeJSONError("Email/Password incorrect")
|
||||
return
|
||||
}
|
||||
|
@ -77,7 +77,12 @@ func GetDatabase(tokenString string) (jwt.MapClaims, *sql.DB, error) {
|
||||
}
|
||||
|
||||
// CreateDatabase Create a database by copying the template
|
||||
func CreateDatabase(token string) {
|
||||
func CreateDatabase(companyName string) {
|
||||
/*
|
||||
if dbs[companyName] != nil {
|
||||
fmt.Println("DB Already open")
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user