Fix 500 on tokens/new

This commit is contained in:
Howl 2016-05-14 20:18:29 +02:00
parent 09582361a3
commit 417409030a

View File

@ -114,7 +114,7 @@ func TokenNewPOST(md common.MethodData) common.CodeMessager {
return Err500 return Err500
} }
} }
_, err = md.DB.Exec("INSERT INTO tokens(user, privileges, description, token) VALUES (?, ?, ?, ?)", r.ID, r.Privileges, data.Description, tokenMD5) _, err = md.DB.Exec("INSERT INTO tokens(user, privileges, description, token, private) VALUES (?, ?, ?, ?, '0')", r.ID, r.Privileges, data.Description, tokenMD5)
if err != nil { if err != nil {
md.Err(err) md.Err(err)
return Err500 return Err500