Skip to content

Commit

Permalink
chore: Remove random team names (#9543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch authored Mar 19, 2024
1 parent 66b0960 commit fe128f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 64 deletions.
54 changes: 0 additions & 54 deletions packages/client/utils/makeDefaultTeamName.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import createNewOrg from './createNewOrg'
import createTeamAndLeader from './createTeamAndLeader'
import getUsersbyDomain from '../../../postgres/queries/getUsersByDomain'
import sendPromptToJoinOrg from '../../../utils/sendPromptToJoinOrg'
import {makeDefaultTeamName} from 'parabol-client/utils/makeDefaultTeamName'
import {DataLoaderWorker} from '../../graphql'
import acceptTeamInvitation from '../../../safeMutations/acceptTeamInvitation'
import isValid from '../../isValid'
Expand Down Expand Up @@ -137,7 +136,7 @@ const bootstrapNewUser = async (
const validNewTeam = {
id: teamId,
orgId,
name: makeDefaultTeamName(teamId),
name: `${preferredName}’s Team`,
isOnboardTeam: true
}
const orgName = `${newUser.preferredName}’s Org`
Expand Down
9 changes: 1 addition & 8 deletions packages/server/graphql/mutations/updateTeamName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import standardError from '../../utils/standardError'
import {GQLContext} from '../graphql'
import UpdatedTeamInput, {UpdatedTeamInputType} from '../types/UpdatedTeamInput'
import UpdateTeamNamePayload from '../types/UpdateTeamNamePayload'
import {makeDefaultTeamName} from 'parabol-client/utils/makeDefaultTeamName'

export default {
type: UpdateTeamNamePayload,
Expand Down Expand Up @@ -60,13 +59,7 @@ export default {
updatedAt: now
}
await updateTeamByTeamId(dbUpdate, teamId)
analytics.teamNameChanged(
viewer,
teamId,
oldName,
newName,
makeDefaultTeamName(teamId) === oldName
)
analytics.teamNameChanged(viewer, teamId, oldName, newName, oldName.endsWith('’s Team'))

const data = {teamId}
publish(SubscriptionChannel.TEAM, teamId, 'UpdateTeamNamePayload', data, subOptions)
Expand Down

0 comments on commit fe128f0

Please sign in to comment.