Skip to content

Commit b42be53

Browse files
committed
add session to options parameter
1 parent f74bb65 commit b42be53

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/controller/org.controller/org.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function getOrgs (req, res, next) {
2828
options.page = req.ctx.query.page ? parseInt(req.ctx.query.page) : CONSTANTS.PAGINATOR_PAGE // if 'page' query parameter is not defined, set 'page' to the default page value
2929

3030
try {
31-
returnValue = await repo.getAllOrgs(options, !req.useRegistry)
31+
returnValue = await repo.getAllOrgs({ ...options, session }, !req.useRegistry)
3232
} finally {
3333
await session.endSession()
3434
}

src/controller/registry-org.controller/registry-org.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function getAllOrgs (req, res, next) {
3636
options.page = req.ctx.query.page ? parseInt(req.ctx.query.page) : CONSTANTS.PAGINATOR_PAGE // if 'page' query parameter is not defined, set 'page' to the default page value
3737

3838
try {
39-
returnValue = await repo.getAllOrgs(options)
39+
returnValue = await repo.getAllOrgs({ ...options, session })
4040
} finally {
4141
await session.endSession()
4242
}

0 commit comments

Comments
 (0)