Skip to content

Commit 411a01c

Browse files
author
James Cori
committed
Merge branch 'dev'
2 parents e3913a8 + a34bd80 commit 411a01c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/services/TermsOfUseService.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ async function getTermsOfUse (currentUser, termsOfUseId, query) {
4747
}
4848
]
4949
if (userId) {
50+
// logger.debug(`Getting Terms for User ${userId}`)
51+
5052
include.push({
5153
model: UserTermsOfUseXref,
54+
as: 'UserTermsOfUseXrefs',
5255
where: { userId },
5356
attributes: ['userId'],
5457
required: false
@@ -71,6 +74,8 @@ async function getTermsOfUse (currentUser, termsOfUseId, query) {
7174
delete termsOfUse['UserTermsOfUseXrefs.userId']
7275
}
7376

77+
// logger.debug(`Raw Returned Data: ${JSON.stringify(termsOfUse)}`)
78+
7479
return convertRawData(termsOfUse)
7580
}
7681

@@ -462,7 +467,7 @@ async function searchTermsOfUses (criteria) {
462467

463468
const query = {
464469
order: [['id', 'ASC']],
465-
attributes: ['id', 'legacyId', 'title', 'url', 'agreeabilityTypeId'],
470+
attributes: ['id', 'legacyId', 'title', 'url', 'agreeabilityTypeId', 'typeId'],
466471
include,
467472
where,
468473
limit: perPage,
@@ -472,7 +477,7 @@ async function searchTermsOfUses (criteria) {
472477

473478
const result = await TermsOfUse.findAll(query)
474479

475-
logger.debug(`Query: ${JSON.stringify(query)}`)
480+
// logger.debug(`Query: ${JSON.stringify(query)}`)
476481

477482
for (const element of result) {
478483
convertRawData(element, false)

0 commit comments

Comments
 (0)