Skip to content

Commit

Permalink
reverts async txn handling
Browse files Browse the repository at this point in the history
  • Loading branch information
TanmoySG committed Apr 23, 2023
1 parent 6bc59a6 commit ea65915
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions internal/server/handlers/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (wh wdbHandlers) CreateCollection(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}

Expand Down Expand Up @@ -78,7 +78,7 @@ func (wh wdbHandlers) FetchCollection(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}

Expand Down Expand Up @@ -108,6 +108,6 @@ func (wh wdbHandlers) DeleteCollection(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}
8 changes: 4 additions & 4 deletions internal/server/handlers/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (wh wdbHandlers) AddData(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}

Expand Down Expand Up @@ -85,7 +85,7 @@ func (wh wdbHandlers) ReadData(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)

return nil
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func (wh wdbHandlers) DeleteData(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}

Expand Down Expand Up @@ -175,6 +175,6 @@ func (wh wdbHandlers) UpdateData(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}
6 changes: 3 additions & 3 deletions internal/server/handlers/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (wh wdbHandlers) CreateDatabase(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)

return nil
}
Expand Down Expand Up @@ -70,7 +70,7 @@ func (wh wdbHandlers) FetchDatabase(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)

return nil
}
Expand Down Expand Up @@ -98,6 +98,6 @@ func (wh wdbHandlers) DeleteDatabase(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, entities)
wh.handleTransactions(c, resp, entities)
return nil
}
2 changes: 1 addition & 1 deletion internal/server/handlers/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ func (wh wdbHandlers) Hello(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)
return nil
}
4 changes: 2 additions & 2 deletions internal/server/handlers/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (wh wdbHandlers) CreateRole(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)
return nil
}

Expand All @@ -65,6 +65,6 @@ func (wh wdbHandlers) ListRoles(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)
return nil
}
6 changes: 3 additions & 3 deletions internal/server/handlers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (wh wdbHandlers) LoginUser(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)

return nil
}
Expand All @@ -63,7 +63,7 @@ func (wh wdbHandlers) CreateUser(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)
return nil
}

Expand Down Expand Up @@ -128,6 +128,6 @@ func (wh wdbHandlers) CheckPermissions(c *fiber.Ctx) error {
return err
}

go wh.handleTransactions(c, resp, noEntities)
wh.handleTransactions(c, resp, noEntities)
return nil
}

0 comments on commit ea65915

Please sign in to comment.