Dont record analytics when showing curations (#103558)
This commit is contained in:
parent
5aa8305279
commit
af62b05e3a
3 changed files with 9 additions and 2 deletions
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue