File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed
Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -44,5 +44,5 @@ module.exports = {
4444 IBM_COGNITIVE_PROGRAM_ID : 3449 ,
4545 HEAP_ANALYTICS_APP_ID : '4153837120' ,
4646
47- TC_NOTIFICATION_URL : 'https://api.topcoder-dev.com'
47+ TC_NOTIFICATION_URL : 'https://api.topcoder-dev.com/v5/notifications '
4848}
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ module.exports = {
4343 IBM_COGNITIVE_PROGRAM_ID : 3449 ,
4444 HEAP_ANALYTICS_APP_ID : '638908330' ,
4545
46- TC_NOTIFICATION_URL : 'https://api.topcoder.com'
46+ TC_NOTIFICATION_URL : 'https://api.topcoder.com/v5/notifications '
4747}
Original file line number Diff line number Diff line change @@ -42,5 +42,5 @@ module.exports = {
4242 IBM_COGNITIVE_PROGRAM_ID : 3449 ,
4343 HEAP_ANALYTICS_APP_ID : '4153837120' ,
4444
45- TC_NOTIFICATION_URL : 'http ://api.topcoder-dev.com/'
45+ TC_NOTIFICATION_URL : 'https ://api.topcoder-dev.com/v5/notifications '
4646}
Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ export const ACCOUNTS_APP_REGISTER_URL = process.env.ACCOUNTS_APP_REGISTER_URL |
297297export const TC_API_URL = `https://api.${ DOMAIN } `
298298export const DIRECT_PROJECT_URL = `https://www.${ DOMAIN } /direct/projectOverview?formData.projectId=`
299299export const SALESFORCE_PROJECT_LEAD_LINK = process . env . SALESFORCE_PROJECT_LEAD_LINK
300- export const TC_NOTIFICATION_URL = process . env . TC_NOTIFICATION_URL || TC_API_URL
300+ export const TC_NOTIFICATION_URL = process . env . TC_NOTIFICATION_URL || ` ${ TC_API_URL } /v5/notifications`
301301
302302export const PROJECT_NAME_MAX_LENGTH = 255
303303export const PROJECT_REF_CODE_MAX_LENGTH = 32
Original file line number Diff line number Diff line change @@ -10,19 +10,19 @@ import { prepareNotifications } from '../helpers/notifications'
1010// the id can be either: null/undefined (mark all); notification id; or '-' separated ids, e.g. '123-456-789'
1111const markNotificationsRead = ( id ) => {
1212 if ( id ) {
13- return axios . put ( `${ TC_NOTIFICATION_URL } /notifications/ ${ id } /read` )
13+ return axios . put ( `${ TC_NOTIFICATION_URL } /${ id } /read` )
1414 } else {
15- return axios . put ( `${ TC_NOTIFICATION_URL } /notifications/ read` )
15+ return axios . put ( `${ TC_NOTIFICATION_URL } /read` )
1616 }
1717}
1818
1919// the id can be either: notification id; or '-' separated ids, e.g. '123-456-789'
2020const markNotificationsSeen = ( id ) => {
21- return axios . put ( `${ TC_NOTIFICATION_URL } /notifications/ ${ id } /seen` )
21+ return axios . put ( `${ TC_NOTIFICATION_URL } /${ id } /seen` )
2222}
2323
2424const getNotifications = ( ) => {
25- return axios . get ( `${ TC_NOTIFICATION_URL } /notifications ?read=false&limit=${ NOTIFICATIONS_LIMIT } ` )
25+ return axios . get ( `${ TC_NOTIFICATION_URL } /list ?read=false&limit=${ NOTIFICATIONS_LIMIT } ` )
2626 . then ( resp => prepareNotifications ( resp . data . items ) )
2727}
2828
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ const changePassword = (password) => {
6262}
6363
6464const getNotificationSettings = ( ) => {
65- return axios . get ( `${ TC_NOTIFICATION_URL } /notificationsettings ` )
65+ return axios . get ( `${ TC_NOTIFICATION_URL } /settings ` )
6666 . then ( resp => resp . data )
6767}
6868
@@ -101,7 +101,7 @@ const saveNotificationSettings = (data) => {
101101 body . push ( { topic, deliveryMethod : 'email' , value : data [ topic ] && data [ topic ] . email === 'yes' ? 'yes' : 'no' } )
102102 body . push ( { topic, deliveryMethod : 'web' , value : data [ topic ] && data [ topic ] . web === 'yes' ? 'yes' : 'no' } )
103103 } )
104- return axios . put ( `${ TC_NOTIFICATION_URL } /notificationsettings ` , body )
104+ return axios . put ( `${ TC_NOTIFICATION_URL } /settings ` , body )
105105}
106106
107107export default {
You can’t perform that action at this time.
0 commit comments