Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cori committed Nov 10, 2020
2 parents e3913a8 + a34bd80 commit 411a01c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/services/TermsOfUseService.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ async function getTermsOfUse (currentUser, termsOfUseId, query) {
}
]
if (userId) {
// logger.debug(`Getting Terms for User ${userId}`)

include.push({
model: UserTermsOfUseXref,
as: 'UserTermsOfUseXrefs',
where: { userId },
attributes: ['userId'],
required: false
Expand All @@ -71,6 +74,8 @@ async function getTermsOfUse (currentUser, termsOfUseId, query) {
delete termsOfUse['UserTermsOfUseXrefs.userId']
}

// logger.debug(`Raw Returned Data: ${JSON.stringify(termsOfUse)}`)

return convertRawData(termsOfUse)
}

Expand Down Expand Up @@ -462,7 +467,7 @@ async function searchTermsOfUses (criteria) {

const query = {
order: [['id', 'ASC']],
attributes: ['id', 'legacyId', 'title', 'url', 'agreeabilityTypeId'],
attributes: ['id', 'legacyId', 'title', 'url', 'agreeabilityTypeId', 'typeId'],
include,
where,
limit: perPage,
Expand All @@ -472,7 +477,7 @@ async function searchTermsOfUses (criteria) {

const result = await TermsOfUse.findAll(query)

logger.debug(`Query: ${JSON.stringify(query)}`)
// logger.debug(`Query: ${JSON.stringify(query)}`)

for (const element of result) {
convertRawData(element, false)
Expand Down

0 comments on commit 411a01c

Please sign in to comment.