Tear down micro survey for new users (#11569)

GitOrigin-RevId: b86cfa150dd365f3d1da758feb20509d35c7cc56
This commit is contained in:
M Fahru
2023-02-01 09:28:41 -07:00
committed by Copybot
parent c0ae1f4c90
commit 772a3efb65
9 changed files with 0 additions and 184 deletions

View File

@@ -556,26 +556,6 @@ const ProjectController = {
}
)
},
newUsersMicroSurveyAssignment(cb) {
SplitTestHandler.getAssignment(
req,
res,
'new-users-micro-survey',
(err, assignment) => {
if (err) {
logger.error(
{ err },
'failed to get "new-users-micro-survey" split test assignment'
)
const defaultAssignment = { variant: 'default' }
cb(null, defaultAssignment)
} else {
cb(null, assignment)
}
}
)
},
survey(cb) {
SurveyHandler.getSurvey(userId, (err, survey) => {
if (err) {
@@ -598,7 +578,6 @@ const ProjectController = {
user,
userEmailsData,
groupsAndEnterpriseBannerAssignment,
newUsersMicroSurveyAssignment,
userIsMemberOfGroupSubscription,
} = results
@@ -739,16 +718,6 @@ const ProjectController = {
!userIsMemberOfGroupSubscription &&
!hasPaidAffiliation
const SEVEN_DAYS = 1000 * 60 * 60 * 24 * 7
const isUserLessThanSevenDaysOld =
user.signUpDate && Date.now() - user.signUpDate.getTime() < SEVEN_DAYS
const showNewUsersMicroSurvey =
Features.hasFeature('saas') &&
newUsersMicroSurveyAssignment.variant === 'enabled' &&
isUserLessThanSevenDaysOld
ProjectController._injectProjectUsers(projects, (error, projects) => {
if (error != null) {
return next(error)
@@ -776,7 +745,6 @@ const ProjectController = {
showGroupsAndEnterpriseBanner,
groupsAndEnterpriseBannerVariant:
groupsAndEnterpriseBannerAssignment.variant,
showNewUsersMicroSurvey,
}
const paidUser =