From a409231ca06d8d7171f2352273841a8548d2f3e6 Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Tue, 25 Jul 2017 10:39:37 +0200 Subject: [PATCH] Some whitespace fixes --- app/v1/token.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/v1/token.go b/app/v1/token.go index 1fb6a73..547b98f 100644 --- a/app/v1/token.go +++ b/app/v1/token.go @@ -112,8 +112,8 @@ func TokenNewPOST(md common.MethodData) common.CodeMessager { tokenStr = common.RandomString(32) tokenMD5 = fmt.Sprintf("%x", md5.Sum([]byte(tokenStr))) r.Token = tokenStr - var id int + var id int err := md.DB.QueryRow("SELECT id FROM tokens WHERE token=? LIMIT 1", tokenMD5).Scan(&id) if err == sql.ErrNoRows { break @@ -229,7 +229,7 @@ func fixPrivileges(user int, db *sqlx.DB) { } rows, err := db.Query(` SELECT - tokens.id, tokens.privileges, users.privileges + tokens.id, tokens.privileges, users.privileges FROM tokens LEFT JOIN users ON users.id = tokens.user `+wc, params...)