Skip to content

Commit

Permalink
Dont record analytics when showing curations (#103558)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonStoltz authored Jun 29, 2021
1 parent 5aa8305 commit af62b05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ describe('CurationLogic', () => {
await nextTick();

expect(http.get).toHaveBeenCalledWith(
'/api/app_search/engines/some-engine/curations/cur-123456789'
'/api/app_search/engines/some-engine/curations/cur-123456789',
{
query: { skip_record_analytics: 'true' },
}
);
expect(CurationLogic.actions.onCurationLoad).toHaveBeenCalledWith(MOCK_CURATION_RESPONSE);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ export const CurationLogic = kea<MakeLogicType<CurationValues, CurationActions,

try {
const response = await http.get(
`/api/app_search/engines/${engineName}/curations/${props.curationId}`
`/api/app_search/engines/${engineName}/curations/${props.curationId}`,
{ query: { skip_record_analytics: 'true' } }
);
actions.onCurationLoad(response);
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export function registerCurationsRoutes({
{
path: '/api/app_search/engines/{engineName}/curations/{curationId}',
validate: {
query: schema.object({
skip_record_analytics: schema.string(),
}),
params: schema.object({
engineName: schema.string(),
curationId: schema.string(),
Expand Down

0 comments on commit af62b05

Please sign in to comment.