mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 01:13:27 +03:00
implement mongo removeDoc
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
10621de2e3
commit
096fe284da
@ -128,8 +128,10 @@ class MongoAdapter extends MongoAdapterBase {
|
||||
return {}
|
||||
}
|
||||
|
||||
protected txRemoveDoc (tx: TxRemoveDoc<Doc>): Promise<TxResult> {
|
||||
throw new Error('Method not implemented.')
|
||||
protected override async txRemoveDoc (tx: TxRemoveDoc<Doc>): Promise<TxResult> {
|
||||
const domain = this.hierarchy.getDomain(tx.objectClass)
|
||||
await this.db.collection(domain).deleteOne({ _id: tx.objectId })
|
||||
return {}
|
||||
}
|
||||
|
||||
protected txMixin (tx: TxMixin<Doc, Doc>): Promise<TxResult> {
|
||||
|
Loading…
Reference in New Issue
Block a user