diff --git a/src/components/comments/index.test.ts b/src/components/comments/index.test.ts index 66231b66..9faa786a 100644 --- a/src/components/comments/index.test.ts +++ b/src/components/comments/index.test.ts @@ -139,8 +139,7 @@ describe('Comments', () => { const spy = jest.spyOn(ApiService, 'fetchAnnotation'); expect(spy).toHaveBeenCalledWith(MOCK_CONFIG.apiUrl, MOCK_CONFIG.apiKey, { - roomId: MOCK_CONFIG.roomId, - url: expect.any(String), + roomId: MOCK_CONFIG.roomId }); }); @@ -161,7 +160,6 @@ describe('Comments', () => { expect(spy).toHaveBeenCalledWith(MOCK_CONFIG.apiUrl, MOCK_CONFIG.apiKey, { roomId: MOCK_CONFIG.roomId, - url: expect.any(String), userId: expect.any(String), position: expect.any(String), }); diff --git a/src/components/comments/index.ts b/src/components/comments/index.ts index 24ef857d..f672cf19 100644 --- a/src/components/comments/index.ts +++ b/src/components/comments/index.ts @@ -134,18 +134,6 @@ export class Comments extends BaseComponent { ); } - /** - * @function url - * @description Gets the URL of the client - * @returns {void} - */ - private get url(): string { - const url = new URL(this.clientUrl); - url.search = ''; - - return url.toString(); - } - /** * @function start * @description Initializes the Comments component @@ -392,7 +380,6 @@ export class Comments extends BaseComponent { private createAnnotation = async ({ detail }: CustomEvent): Promise => { try { const { text, mentions } = detail; - const { url } = this; const position = { ...this.coordinates }; const annotation = await ApiService.createAnnotations( config.get('apiUrl'), @@ -400,7 +387,6 @@ export class Comments extends BaseComponent { { roomId: config.get('roomId'), position: JSON.stringify(position), - url, userId: this.localParticipantId, }, ); @@ -604,7 +590,6 @@ export class Comments extends BaseComponent { { roomId: config.get('roomId'), - url: this.url, }, ); diff --git a/src/services/api/index.test.ts b/src/services/api/index.test.ts index a081fbdc..d71b4bd9 100644 --- a/src/services/api/index.test.ts +++ b/src/services/api/index.test.ts @@ -138,7 +138,6 @@ describe('ApiService', () => { const baseUrl = 'https://dev.nodeapi.superviz.com'; const response = await ApiService.createAnnotations(baseUrl, VALID_API_KEY, { roomId: 'any_room_id', - url: 'any_url', position: 'any_position', userId: 'any_user_id', }); @@ -162,7 +161,6 @@ describe('ApiService', () => { const baseUrl = 'https://dev.nodeapi.superviz.com'; const response = await ApiService.fetchAnnotation(baseUrl, VALID_API_KEY, { roomId: 'any_room_id', - url: 'any_url', }); expect(response).toEqual([]); diff --git a/src/services/api/index.ts b/src/services/api/index.ts index 0c7c83f7..68988598 100644 --- a/src/services/api/index.ts +++ b/src/services/api/index.ts @@ -74,8 +74,7 @@ export default class ApiService { static async fetchAnnotation(baseUrl: string, apiKey: string, query: FetchAnnotationsParams) { const path = '/annotations'; const url = this.createUrl(baseUrl, path, { - roomId: query.roomId, - url: query.url, + roomId: query.roomId }); return doRequest(url, 'GET', undefined, { apikey: apiKey }); } diff --git a/src/services/api/types.ts b/src/services/api/types.ts index 624b6cee..e2e5b32d 100644 --- a/src/services/api/types.ts +++ b/src/services/api/types.ts @@ -1,6 +1,5 @@ export type AnnotationParams = { roomId: string; - url: string; position: string; userId: string; }; @@ -13,7 +12,6 @@ export type CommentParams = { export type FetchAnnotationsParams = { roomId: string; - url: string; } export type MentionParams = {