This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree 5 files changed +2
-24
lines changed
5 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,7 @@ describe('Comments', () => {
139
139
const spy = jest . spyOn ( ApiService , 'fetchAnnotation' ) ;
140
140
141
141
expect ( spy ) . toHaveBeenCalledWith ( MOCK_CONFIG . apiUrl , MOCK_CONFIG . apiKey , {
142
- roomId : MOCK_CONFIG . roomId ,
143
- url : expect . any ( String ) ,
142
+ roomId : MOCK_CONFIG . roomId
144
143
} ) ;
145
144
} ) ;
146
145
@@ -161,7 +160,6 @@ describe('Comments', () => {
161
160
162
161
expect ( spy ) . toHaveBeenCalledWith ( MOCK_CONFIG . apiUrl , MOCK_CONFIG . apiKey , {
163
162
roomId : MOCK_CONFIG . roomId ,
164
- url : expect . any ( String ) ,
165
163
userId : expect . any ( String ) ,
166
164
position : expect . any ( String ) ,
167
165
} ) ;
Original file line number Diff line number Diff line change @@ -134,18 +134,6 @@ export class Comments extends BaseComponent {
134
134
) ;
135
135
}
136
136
137
- /**
138
- * @function url
139
- * @description Gets the URL of the client
140
- * @returns {void }
141
- */
142
- private get url ( ) : string {
143
- const url = new URL ( this . clientUrl ) ;
144
- url . search = '' ;
145
-
146
- return url . toString ( ) ;
147
- }
148
-
149
137
/**
150
138
* @function start
151
139
* @description Initializes the Comments component
@@ -392,15 +380,13 @@ export class Comments extends BaseComponent {
392
380
private createAnnotation = async ( { detail } : CustomEvent ) : Promise < void > => {
393
381
try {
394
382
const { text, mentions } = detail ;
395
- const { url } = this ;
396
383
const position = { ...this . coordinates } ;
397
384
const annotation = await ApiService . createAnnotations (
398
385
config . get < string > ( 'apiUrl' ) ,
399
386
config . get < string > ( 'apiKey' ) ,
400
387
{
401
388
roomId : config . get < string > ( 'roomId' ) ,
402
389
position : JSON . stringify ( position ) ,
403
- url,
404
390
userId : this . localParticipantId ,
405
391
} ,
406
392
) ;
@@ -604,7 +590,6 @@ export class Comments extends BaseComponent {
604
590
605
591
{
606
592
roomId : config . get ( 'roomId' ) ,
607
- url : this . url ,
608
593
} ,
609
594
) ;
610
595
Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ describe('ApiService', () => {
138
138
const baseUrl = 'https://dev.nodeapi.superviz.com' ;
139
139
const response = await ApiService . createAnnotations ( baseUrl , VALID_API_KEY , {
140
140
roomId : 'any_room_id' ,
141
- url : 'any_url' ,
142
141
position : 'any_position' ,
143
142
userId : 'any_user_id' ,
144
143
} ) ;
@@ -162,7 +161,6 @@ describe('ApiService', () => {
162
161
const baseUrl = 'https://dev.nodeapi.superviz.com' ;
163
162
const response = await ApiService . fetchAnnotation ( baseUrl , VALID_API_KEY , {
164
163
roomId : 'any_room_id' ,
165
- url : 'any_url' ,
166
164
} ) ;
167
165
168
166
expect ( response ) . toEqual ( [ ] ) ;
Original file line number Diff line number Diff line change @@ -74,8 +74,7 @@ export default class ApiService {
74
74
static async fetchAnnotation ( baseUrl : string , apiKey : string , query : FetchAnnotationsParams ) {
75
75
const path = '/annotations' ;
76
76
const url = this . createUrl ( baseUrl , path , {
77
- roomId : query . roomId ,
78
- url : query . url ,
77
+ roomId : query . roomId
79
78
} ) ;
80
79
return doRequest ( url , 'GET' , undefined , { apikey : apiKey } ) ;
81
80
}
Original file line number Diff line number Diff line change 1
1
export type AnnotationParams = {
2
2
roomId : string ;
3
- url : string ;
4
3
position : string ;
5
4
userId : string ;
6
5
} ;
@@ -13,7 +12,6 @@ export type CommentParams = {
13
12
14
13
export type FetchAnnotationsParams = {
15
14
roomId : string ;
16
- url : string ;
17
15
}
18
16
19
17
export type MentionParams = {
You can’t perform that action at this time.
0 commit comments