mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Run prepare on the transaction, not the db
This commit is contained in:
@@ -64,7 +64,7 @@ func (b *backend) pathCredsCreateRead(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Get our connection
|
||||
// Get our handle
|
||||
db, err := b.DB(req.Storage)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -83,7 +83,7 @@ func (b *backend) pathCredsCreateRead(
|
||||
|
||||
// Execute each query
|
||||
for _, query := range SplitSQL(roleSQL) {
|
||||
stmt, err := db.Prepare(Query(query, map[string]string{
|
||||
stmt, err := tx.Prepare(Query(query, map[string]string{
|
||||
"name": username,
|
||||
"password": password,
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user