@@ -1024,8 +1024,8 @@ const mainStore = {
1024
1024
if ( ! getters . getSelectedService || ! getters . getSelectedService . tenantUrl ) {
1025
1025
return reject ( new Error ( 'Tenant url is null or empty, service is not selected' ) )
1026
1026
}
1027
- // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/webhook-config/${payload._id}`;
1028
- const url = `http://localhost:3001/api/v1/e-kyc/verification/webhook-config/${ payload . _id } `
1027
+ const url = `${ sanitizeUrl ( getters . getSelectedService . tenantUrl ) } /api/v1/e-kyc/verification/webhook-config/${ payload . _id } ` ;
1028
+ // const url = `http://localhost:3001/api/v1/e-kyc/verification/webhook-config/${payload._id}`
1029
1029
const authToken = getters . getSelectedService . access_token
1030
1030
const headers = UtilsMixin . methods . getHeader ( authToken ) ;
1031
1031
fetch ( url , {
@@ -1045,17 +1045,14 @@ const mainStore = {
1045
1045
} ,
1046
1046
1047
1047
1048
-
1049
-
1050
-
1051
1048
fetchSessionsDetailsById : ( { commit, getters } , payload ) => {
1052
1049
return new Promise ( ( resolve , reject ) => {
1053
1050
const { sessionId } = payload
1054
1051
if ( ! getters . getSelectedService || ! getters . getSelectedService . tenantUrl ) {
1055
1052
return reject ( new Error ( 'Tenant url is null or empty, service is not selected' ) )
1056
1053
}
1057
- // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/session/${sessionId}`;
1058
- const url = `http://localhost:3001/api/v1/e-kyc/verification/session/${ sessionId } ` ;
1054
+ const url = `${ sanitizeUrl ( getters . getSelectedService . tenantUrl ) } /api/v1/e-kyc/verification/session/${ sessionId } ` ;
1055
+ // const url = `http://localhost:3001/api/v1/e-kyc/verification/session/${sessionId}`;
1059
1056
const authToken = getters . getSelectedService . access_token
1060
1057
const headers = UtilsMixin . methods . getHeader ( authToken ) ;
1061
1058
fetch ( url , {
@@ -1084,8 +1081,8 @@ const mainStore = {
1084
1081
if ( ! getters . getSelectedService || ! getters . getSelectedService . tenantUrl ) {
1085
1082
throw new Error ( 'Tenant url is null or empty, service is not selected' )
1086
1083
}
1087
- // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/usage?serviceId=${getters.getSelectedService.appId}&startDate=${startDate}&endDate=${endDate}`;
1088
- const url = `http://localhost:3001/api/v1/usage?serviceId=${ getters . getSelectedService . appId } &startDate=${ startDate } &endDate=${ endDate } ` ;
1084
+ const url = `${ sanitizeUrl ( getters . getSelectedService . tenantUrl ) } /api/v1/usage?serviceId=${ getters . getSelectedService . appId } &startDate=${ startDate } &endDate=${ endDate } ` ;
1085
+ // const url = `http://localhost:3001/api/v1/usage?serviceId=${getters.getSelectedService.appId}&startDate=${startDate}&endDate=${endDate}`;
1089
1086
const authToken = getters . getSelectedService . access_token
1090
1087
const headers = UtilsMixin . methods . getHeader ( authToken ) ;
1091
1088
const resp = await fetch ( url , {
@@ -1121,8 +1118,7 @@ const mainStore = {
1121
1118
if ( ! getters . getSelectedService || ! getters . getSelectedService . tenantUrl ) {
1122
1119
throw new Error ( 'Tenant url is null or empty, service is not selected' )
1123
1120
}
1124
- // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/usage?serviceId=${getters.getSelectedService.appId}&startDate=${startDate}&endDate=${endDate}`;
1125
- const url = `http://localhost:3001/api/v1/credit` ;
1121
+ const url = `${ sanitizeUrl ( getters . getSelectedService . tenantUrl ) } /api/v1/credit` ;
1126
1122
const authToken = getters . getSelectedService . access_token
1127
1123
const headers = UtilsMixin . methods . getHeader ( authToken ) ;
1128
1124
const resp = await fetch ( url , {
@@ -1150,7 +1146,7 @@ const mainStore = {
1150
1146
if ( ! creditId ) {
1151
1147
return reject ( new Error ( 'Credit Id is null or empty' ) )
1152
1148
}
1153
- const url = `http://localhost:3001 /api/v1/credit/${ creditId } /activate` ;
1149
+ const url = `${ sanitizeUrl ( getters . getSelectedService . tenantUrl ) } /api/v1/credit/${ creditId } /activate` ;
1154
1150
const options = {
1155
1151
method : "POST" ,
1156
1152
headers : {
0 commit comments