From 8b7754f9467240c9fd89169cc8cbd083f3ea29a7 Mon Sep 17 00:00:00 2001 From: agnisa-cap Date: Fri, 22 Sep 2023 14:51:56 +0200 Subject: [PATCH 1/2] N21-1269 pseudonym username fix (#3312) --- controllers/oauth2.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/oauth2.js b/controllers/oauth2.js index 3e0c6c9731..0b47996516 100644 --- a/controllers/oauth2.js +++ b/controllers/oauth2.js @@ -149,10 +149,9 @@ router.get('/username/:pseudonym', async (req, res, next) => { if (Configuration.get('FEATURE_CTL_TOOLS_TAB_ENABLED')) { const pseudonymResponse = await api(req, { version: 'v3' }) .get(`/pseudonyms/${req.params.pseudonym}`); - const userResponse = await api(req) .get('/users', { - qs: { id: pseudonymResponse.userId }, + qs: { _id: pseudonymResponse.userId }, $limit: 1, }); if (userResponse.data.length) { From 8251a45d7ec285885210228ad4fdadf54edfb482 Mon Sep 17 00:00:00 2001 From: davwas Date: Fri, 22 Sep 2023 15:30:44 +0200 Subject: [PATCH 2/2] BC-4900 - Red line shows when removing task (#3306) *fix redirect --- controllers/homework.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/homework.js b/controllers/homework.js index 1a87b5ca0d..f908914e21 100644 --- a/controllers/homework.js +++ b/controllers/homework.js @@ -370,8 +370,7 @@ const getDeleteHandler = (service, redirectToReferer) => (req, res, next) => { if (redirectToReferer) { redirectHelper.safeBackRedirect(req, res); } else { - res.sendStatus(200); - res.redirect(`/${service}`); + res.redirect(200, `/${service}`); } }).catch((err) => { next(err);