From 4077e19f34d7c73f4eb4bddc76146d2c9a549753 Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 1 Apr 2019 07:33:06 +0000 Subject: [PATCH] fix sql --- model/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/account.go b/model/account.go index cd2e70d..1caba91 100644 --- a/model/account.go +++ b/model/account.go @@ -40,7 +40,7 @@ func GetAccount(account string) (acc *Account, err error) { // CreateAccount - func CreateAccount(account, password string) (acc *Account, err error) { 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 { return nil, nil }