Skip to content

Commit

Permalink
BC-8018 - refactor API endpoint for retrieving JWT in users controller
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenWaysDP committed Sep 24, 2024
1 parent 5b51089 commit bd0a2b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ router.get('/search', function (req, res, next) {

router.get('/jwt/:id', async (req, res, next) => {
try {
const getJWT = api(req).post('/accounts/supportJWT', {
const getJWT = api(req, {version: 'v3'}).post('/shd/supportJwt', {
json: {
userId: req.params.id,
},
Expand All @@ -449,7 +449,7 @@ router.get('/jwt/:id', async (req, res, next) => {

res.render('users/jwt', {
title: `JWT für ${user.displayName}`,
jwt: jwt || '',
jwt: jwt.accessToken || '',
user: user,
themeTitle: process.env.SC_NAV_TITLE || 'Schul-Cloud',
});
Expand Down

0 comments on commit bd0a2b5

Please sign in to comment.