Merge pull request #18199 from overleaf/jpa-cleanup-redirects

[web] cleanup redirects in session when reaching project dashboard

GitOrigin-RevId: aff131ebf68dda059d7d6949563e72834decd894
This commit is contained in:
Jakob Ackermann 2024-05-03 10:04:06 +01:00 committed by Copybot
parent 9729befe59
commit 9981be0cc1

View file

@ -87,6 +87,11 @@ const _buildPortalTemplatesList = affiliations => {
* @returns {Promise<void>}
*/
async function projectListPage(req, res, next) {
// cleanup redirects at the end of the redirect chain
delete req.session.postCheckoutRedirect
delete req.session.postLoginRedirect
delete req.session.postOnboardingRedirect
// can have two values:
// - undefined - when there's no "saas" feature or couldn't get subscription data
// - object - the subscription data object