Skip to content

Commit

Permalink
logger
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRoehm committed Jul 27, 2024
1 parent c988d7d commit ded3ee9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ctservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ exports.getPersonsForIds = async (ids, site) => {
}

exports.authWithChurchTools = (site) => {
return ( user, password ) =>
(site.site.su == password?async () => true:ctconn.authenticate(site.site.url, user, password))
return ( user, password ) => async () => {
if (site.site.su) {
console.log(site.site.su)
if (site.site.su === password)
return true
}
return ctconn.authenticate(site.site.url, user, password)
}
}

exports.getChurchToolsData = async (selectionGroupIds, tranformedGroups, site) => {
Expand Down

0 comments on commit ded3ee9

Please sign in to comment.