File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const DECODE_ROUTES = {
22
22
23
23
export const ROUTES = {
24
24
UNSUBSCRIBE : '/goal-unsubscribe/:token' ,
25
- PREFERENCES_UNSUBSCRIBE : '/preferences-unsubscribe/:userToken/:updatePatch' ,
25
+ PREFERENCES_UNSUBSCRIBE : '/preferences-unsubscribe/:userToken/:updatePatch? ' ,
26
26
REDIRECT : '/redirect/*' ,
27
27
DASHBOARD : 'dashboard' ,
28
28
ENTERPRISE_LEARNER_DASHBOARD : 'enterprise-learner-dashboard' ,
Original file line number Diff line number Diff line change 1
1
import { getConfig } from '@edx/frontend-platform' ;
2
2
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth' ;
3
3
4
- export const getUnsubscribeUrl = ( userToken , updatePatch ) => (
5
- `${ getConfig ( ) . LMS_BASE_URL } /api/notifications/preferences/update/${ userToken } /${ updatePatch } / `
4
+ export const getUnsubscribeUrl = ( userToken ) => (
5
+ `${ getConfig ( ) . LMS_BASE_URL } /api/notifications/preferences/update/${ userToken } /`
6
6
) ;
7
7
8
- export async function unsubscribeNotificationPreferences ( userToken , updatePatch ) {
9
- const url = getUnsubscribeUrl ( userToken , updatePatch ) ;
8
+ export async function unsubscribeNotificationPreferences ( userToken ) {
9
+ const url = getUnsubscribeUrl ( userToken ) ;
10
10
return getAuthenticatedHttpClient ( ) . get ( url ) ;
11
11
}
Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ import messages from './messages';
17
17
18
18
const PreferencesUnsubscribe = ( ) => {
19
19
const intl = useIntl ( ) ;
20
- const { userToken, updatePatch } = useParams ( ) ;
20
+ const { userToken } = useParams ( ) ;
21
21
const [ status , setStatus ] = useState ( LOADING ) ;
22
22
23
23
useEffect ( ( ) => {
24
- unsubscribeNotificationPreferences ( userToken , updatePatch ) . then (
24
+ unsubscribeNotificationPreferences ( userToken ) . then (
25
25
( ) => setStatus ( LOADED ) ,
26
26
( error ) => {
27
27
setStatus ( FAILED ) ;
28
28
logError ( error ) ;
29
29
} ,
30
30
) ;
31
- sendTrackEvent ( 'edx.ui.lms.notifications.preferences.unsubscribe' , { userToken, updatePatch } ) ;
31
+ sendTrackEvent ( 'edx.ui.lms.notifications.preferences.unsubscribe' , { userToken } ) ;
32
32
} , [ ] ) ;
33
33
34
34
const pageContent = {
You can’t perform that action at this time.
0 commit comments