@@ -212,6 +212,29 @@ const e2eEndpoints = API.v1
212212
213213 await updateGroupKey ( rid , uid , key , this . userId ) ;
214214
215+ return API . v1 . success ( ) ;
216+ } ,
217+ )
218+ . post (
219+ 'e2e.acceptSuggestedGroupKey' ,
220+ {
221+ authRequired : true ,
222+ body : ise2eGetUsersOfRoomWithoutKeyParamsGET ,
223+ response : {
224+ 200 : ajv . compile < void > ( {
225+ type : 'object' ,
226+ properties : {
227+ success : { type : 'boolean' , enum : [ true ] } ,
228+ } ,
229+ required : [ 'success' ] ,
230+ } ) ,
231+ } ,
232+ } ,
233+ async function action ( ) {
234+ const { rid } = this . bodyParams ;
235+
236+ await handleSuggestedGroupKey ( 'accept' , rid , this . userId , 'e2e.acceptSuggestedGroupKey' ) ;
237+
215238 return API . v1 . success ( ) ;
216239 } ,
217240 ) ;
@@ -271,22 +294,7 @@ API.v1.addRoute(
271294 } ,
272295) ;
273296
274- API . v1 . addRoute (
275- 'e2e.acceptSuggestedGroupKey' ,
276- {
277- authRequired : true ,
278- validateParams : ise2eGetUsersOfRoomWithoutKeyParamsGET ,
279- } ,
280- {
281- async post ( ) {
282- const { rid } = this . bodyParams ;
283-
284- await handleSuggestedGroupKey ( 'accept' , rid , this . userId , 'e2e.acceptSuggestedGroupKey' ) ;
285297
286- return API . v1 . success ( ) ;
287- } ,
288- } ,
289- ) ;
290298
291299API . v1 . addRoute (
292300 'e2e.rejectSuggestedGroupKey' ,
@@ -385,5 +393,5 @@ export type E2eEndpoints = ExtractRoutesFromAPI<typeof e2eEndpoints>;
385393
386394declare module '@rocket.chat/rest-typings' {
387395 // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-interface
388- interface Endpoints extends E2eEndpoints { }
396+ interface Endpoints extends E2eEndpoints { }
389397}
0 commit comments