Skip to content

Commit

Permalink
Remove flow param for Events API requests
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Jun 24, 2024
1 parent 243277e commit 87089f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint-check-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
types: [opened, edited, reopened, ready_for_review]
paths:
- '**.php'
- '!build/**/*.php'
workflow_dispatch:

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions src/OnboardingSPA/utils/api/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {
migrateRestBase,
} from '../../../constants';

export const onboardingRestURL = ( api ) => {
export const onboardingRestURL = ( api, includeFlow = true ) => {
return (
`${ onboardingRestBase }/${ api }` +
( window.nfdOnboarding?.currentFlow
( includeFlow && window.nfdOnboarding?.currentFlow
? `&flow=${ window.nfdOnboarding.currentFlow }`
: '' )
);
Expand Down
4 changes: 2 additions & 2 deletions src/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if ( runtimeDataExists ) {
HiiveAnalytics.initialize( {
namespace: CATEGORY,
urls: {
single: onboardingRestURL( 'events' ),
batch: onboardingRestURL( 'events/batch' ),
single: onboardingRestURL( 'events', false ),
batch: onboardingRestURL( 'events/batch', false ),
},
settings: {
debounce: {
Expand Down

0 comments on commit 87089f8

Please sign in to comment.