Add write transactions
This commit is contained in:
parent
c0fd041532
commit
5bea3c94c1
4 changed files with 19 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ pub async fn create_document(
|
|||
|
||||
let mut transaction = state
|
||||
.database
|
||||
.create_transaction()
|
||||
.create_write_transaction()
|
||||
.await
|
||||
.map_err(server_error)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ pub async fn delete_document(
|
|||
|
||||
let mut transaction = state
|
||||
.database
|
||||
.create_transaction()
|
||||
.create_write_transaction()
|
||||
.await
|
||||
.map_err(server_error)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ pub async fn update_document(
|
|||
|
||||
let mut transaction = state
|
||||
.database
|
||||
.create_transaction()
|
||||
.create_write_transaction()
|
||||
.await
|
||||
.map_err(server_error)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue