diff --git a/internal/server/handlers/collection.go b/internal/server/handlers/collection.go index 4f71e1a..79884fc 100644 --- a/internal/server/handlers/collection.go +++ b/internal/server/handlers/collection.go @@ -47,10 +47,7 @@ func (wh wdbHandlers) CreateCollection(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } @@ -81,10 +78,7 @@ func (wh wdbHandlers) FetchCollection(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } @@ -114,9 +108,6 @@ func (wh wdbHandlers) DeleteCollection(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } diff --git a/internal/server/handlers/data.go b/internal/server/handlers/data.go index 6d820e2..6c95540 100644 --- a/internal/server/handlers/data.go +++ b/internal/server/handlers/data.go @@ -43,10 +43,7 @@ func (wh wdbHandlers) AddData(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } @@ -88,9 +85,7 @@ func (wh wdbHandlers) ReadData(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } + go wh.handleTransactions(c, resp, entities) return nil } @@ -133,10 +128,7 @@ func (wh wdbHandlers) DeleteData(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } @@ -183,9 +175,6 @@ func (wh wdbHandlers) UpdateData(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } diff --git a/internal/server/handlers/database.go b/internal/server/handlers/database.go index 157a6b5..04e08aa 100644 --- a/internal/server/handlers/database.go +++ b/internal/server/handlers/database.go @@ -41,9 +41,7 @@ func (wh wdbHandlers) CreateDatabase(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } + go wh.handleTransactions(c, resp, entities) return nil } @@ -72,9 +70,7 @@ func (wh wdbHandlers) FetchDatabase(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } + go wh.handleTransactions(c, resp, entities) return nil } @@ -102,9 +98,6 @@ func (wh wdbHandlers) DeleteDatabase(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, entities) return nil } diff --git a/internal/server/handlers/hello.go b/internal/server/handlers/hello.go index d2f8503..0f8a17f 100644 --- a/internal/server/handlers/hello.go +++ b/internal/server/handlers/hello.go @@ -25,9 +25,6 @@ func (wh wdbHandlers) Hello(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, noEntities) return nil } diff --git a/internal/server/handlers/roles.go b/internal/server/handlers/roles.go index cf89b1b..0d29b93 100644 --- a/internal/server/handlers/roles.go +++ b/internal/server/handlers/roles.go @@ -42,10 +42,7 @@ func (wh wdbHandlers) CreateRole(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, noEntities) return nil } @@ -68,9 +65,6 @@ func (wh wdbHandlers) ListRoles(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, noEntities) return nil } diff --git a/internal/server/handlers/users.go b/internal/server/handlers/users.go index d0ffa35..db1b042 100644 --- a/internal/server/handlers/users.go +++ b/internal/server/handlers/users.go @@ -37,9 +37,7 @@ func (wh wdbHandlers) LoginUser(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } + go wh.handleTransactions(c, resp, noEntities) return nil } @@ -65,10 +63,7 @@ func (wh wdbHandlers) CreateUser(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, noEntities) return nil } @@ -108,10 +103,7 @@ func (wh wdbHandlers) GrantRoles(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, noEntities); err != nil { - return err - } - + wh.handleTransactions(c, resp, noEntities) return nil } @@ -136,9 +128,6 @@ func (wh wdbHandlers) CheckPermissions(c *fiber.Ctx) error { return err } - if err := wh.handleTransactions(c, resp, entities); err != nil { - return err - } - + go wh.handleTransactions(c, resp, noEntities) return nil }