Skip to content

Commit

Permalink
ASAP-351 Remove old tags fields (#4215)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabiayako authored Mar 28, 2024
1 parent 82e2fd5 commit 5d7d398
Show file tree
Hide file tree
Showing 46 changed files with 184 additions and 794 deletions.
2 changes: 1 addition & 1 deletion apps/auth0/src/__tests__/post-login-add-metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('For a CRN login', () => {
role: 'Lead PI (Core Leadership)',
},
],
expertiseAndResourceTags: [],
tags: [],
questions: [],
workingGroups: [],
interestGroups: [],
Expand Down
2 changes: 0 additions & 2 deletions apps/crn-frontend/src/hooks/__tests__/onboarding.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const emptyUser: UserResponse = {
jobTitle: undefined,
city: undefined,
country: undefined,
expertiseAndResourceTags: [],
teams: [],
questions: [],
};
Expand Down Expand Up @@ -180,7 +179,6 @@ describe('useOnboarding', () => {
jobTitle: 'PG',
city: 'California',
country: 'USA',
expertiseAndResourceTags: ['1', '2', '3', '4', '5'],
responsibilities: '3pt Shooter',
};
mockGetUser.mockResolvedValue(user);
Expand Down
2 changes: 1 addition & 1 deletion apps/crn-frontend/src/network/users/__tests__/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('getUsersAndExternalAuthors', () => {
...userResponse,
objectID: userResponse.id,
__meta: { type: 'user' },
_tags: userResponse.expertiseAndResourceTags,
_tags: userResponse.tags?.map(({ name }) => name) || [],
},
]);

Expand Down
21 changes: 0 additions & 21 deletions apps/crn-server/scripts/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { hideBin } from 'yargs/helpers';
import { exportEntity } from './export-entity';
import { exportAnalyticsData } from './export-analytics';
import type { Metric } from './export-analytics';
import * as updateTags from './update-tags';

// eslint-disable-next-line no-unused-expressions
yargs(hideBin(process.argv))
Expand Down Expand Up @@ -68,26 +67,6 @@ yargs(hideBin(process.argv))
handler: async ({ metric, filename }) =>
exportAnalyticsData(metric as Metric, filename),
})
.command<{ entity: string }>({
command: 'tags <entity>',
describe: 'update tags for an entity',
builder: (cli) =>
cli.positional('entity', {
describe: 'specify an entity to update tags for',
type: 'string',
choices: ['user', 'event', 'team', 'group'],
demandOption: true,
}),
handler: async ({ entity }: { entity: string }) => {
switch (entity) {
case 'user':
await updateTags.updateUsersTags();
break;
default:
console.error('no matching entity');
}
},
})
.demandCommand(1)
.help('h')
.alias('h', 'help')
Expand Down
Loading

0 comments on commit 5d7d398

Please sign in to comment.