mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
Use readTransaction for non-write transactions
This commit is contained in:
parent
7116f31cf2
commit
5117a97b1c
@ -72,7 +72,7 @@ const validateReview = async (resolve, root, args, context, info) => {
|
||||
const { user, driver } = context
|
||||
if (resourceId === user.id) throw new Error('You cannot review yourself!')
|
||||
const session = driver.session()
|
||||
const reportReadTxPromise = session.writeTransaction(async txc => {
|
||||
const reportReadTxPromise = session.readTransaction(async txc => {
|
||||
const validateReviewTransactionResponse = await txc.run(
|
||||
`
|
||||
MATCH (resource {id: $resourceId})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user