Skip to content

Commit

Permalink
N21-1269 changed response
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed Sep 20, 2023
1 parent a61019a commit f9a77ba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions controllers/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ router.get('/consent', csrfProtection, auth.authChecker, (req, res, next) => {
({ skipConsent } = tools.data[0]);
} else {
throw new Error(
`Unable to find a singular LtiTool with client_id ${consentRequest.client.client_id} for consent request`,
`Unable to find a singular LtiTool with client_id
${consentRequest.client.client_id} for consent request`,
);
}
}
Expand Down Expand Up @@ -132,9 +133,11 @@ router.post('/consent', auth.authChecker, (r, w) => acceptConsent(r, w, r.query.
router.get('/username/:pseudonym', (req, res, next) => {
if (req.cookies.jwt) {
if (Configuration.get('FEATURE_CTL_TOOLS_TAB_ENABLED')) {
res = api(req, { version: 'v3' })
const apiv3res = api(req, { version: 'v3' })
.get(`/pseudonyms/${req.params.pseudonym}`);
res = [res];
res = {
data: [apiv3res],
};
} else {
res = api(req)
.get('/pseudonym', {
Expand Down

0 comments on commit f9a77ba

Please sign in to comment.