fix(fe2): not being able to remove member from workspace (#4468)

* fix(fe2): not being able to remove member from workspace

* minor comment

* withTransaction refactor
This commit is contained in:
Kristaps Fabians Geikins
2025-04-17 10:44:55 +03:00
committed by GitHub
parent c33052e697
commit 0cc19dbdf5
9 changed files with 326 additions and 237 deletions
@@ -1,6 +1,13 @@
import { EmitArg, EventBus, EventBusEmit } from '@/modules/shared/services/eventBus'
import { Knex } from 'knex'
/**
* TODO: Fix api - make operationFactory db arg actually return the trx. Currently many usages of this
* are not working correctly cause they just use the db, skipping the transaction
*
* Also: withOperationLogging and withOperationTransaction could all be merged into this, with
* this having a better name like `operationFactory`
*/
export const commandFactory =
<TOperation extends (...args: Parameters<TOperation>) => ReturnType<TOperation>>({
db,