Commit 48b69f81 authored by nanahira's avatar nanahira

fix transaction

parent c718a185
Pipeline #12160 failed with stages
in 1 minute and 15 seconds
...@@ -51,7 +51,7 @@ class DataManager { ...@@ -51,7 +51,7 @@ class DataManager {
try { try {
// @ts-ignore // @ts-ignore
if (this.config.type !== 'sqlite') { if (this.config.type !== 'sqlite') {
this.db.transaction(async (mdb) => { await this.db.transaction(async (mdb) => {
const result = await fun(mdb); const result = await fun(mdb);
if (!result) { if (!result) {
throw new Error('Rollback requested.'); throw new Error('Rollback requested.');
......
...@@ -50,7 +50,7 @@ export class DataManager { ...@@ -50,7 +50,7 @@ export class DataManager {
try { try {
// @ts-ignore // @ts-ignore
if (this.config.type !== 'sqlite') { if (this.config.type !== 'sqlite') {
this.db.transaction(async (mdb) => { await this.db.transaction(async (mdb) => {
const result = await fun(mdb); const result = await fun(mdb);
if (!result) { if (!result) {
throw new Error('Rollback requested.'); throw new Error('Rollback requested.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment