Skip to content

Commit 35cfbe6

Browse files
committed
remove tenantId from initiate function and request
1 parent 25a18f1 commit 35cfbe6

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

service/index.ts

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,22 @@ const project = {
3737
};
3838

3939
export const initiate = async (props: InitiateProps) => {
40-
const { tenantId, apiKey, subscriptionKey } = props;
40+
const { apiKey, subscriptionKey } = props;
4141

4242
try {
43-
const response = await axios.get<ConfigsProps>(
44-
`/api/v1/tenant/config/${tenantId}`,
45-
{
46-
params: {
47-
tenantId,
48-
plugin: true, // This is for backend compatibility
49-
project: project.name, // This is for backend compatibility & analytics
50-
version: project.version, // This is for backend compatibility & analytics
51-
},
52-
headers: {
53-
apiKey,
54-
subscriptionKey,
55-
},
43+
const response = await axios.get<ConfigsProps>(`/api/v1/tenant/config/`, {
44+
params: {
45+
plugin: true, // This is for backend compatibility
46+
project: project.name, // This is for backend compatibility & analytics
47+
version: project.version, // This is for backend compatibility & analytics
5648
},
57-
);
49+
headers: {
50+
apiKey,
51+
subscriptionKey,
52+
},
53+
});
5854

59-
if (response.data.tenantId === tenantId) {
55+
if (response.data.tenantId) {
6056
return response.data;
6157
}
6258

0 commit comments

Comments
 (0)