This commit is contained in:
Jay 2019-04-01 07:33:06 +00:00
parent e170de536a
commit 4077e19f34

View File

@ -40,7 +40,7 @@ func GetAccount(account string) (acc *Account, err error) {
// CreateAccount - // CreateAccount -
func CreateAccount(account, password string) (acc *Account, err error) { func CreateAccount(account, password string) (acc *Account, err error) {
acc = &Account{} acc = &Account{}
err = x.Get(acc, `insert into "public"."account" ("account", "password", "ctime", "mtime") values ($1, $2, now(), now())`, account, password) err = x.Get(acc, `insert into "public"."account" ("account", "password", "ctime", "mtime") values ($1, $2, now(), now()) returning *`, account, password)
if err == sql.ErrNoRows { if err == sql.ErrNoRows {
return nil, nil return nil, nil
} }