From bfdc53a48d99dc501560c8269eea577174ba26ac Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Fri, 11 Mar 2022 13:26:16 -0300 Subject: [PATCH] Chore: Migrate REST API - e2eFetchMyKeys to Typescript --- app/definitions/rest/v1/e2e.ts | 3 +++ app/lib/rocketchat/rocketchat.js | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/definitions/rest/v1/e2e.ts b/app/definitions/rest/v1/e2e.ts index 44705c851..f23c0fac9 100644 --- a/app/definitions/rest/v1/e2e.ts +++ b/app/definitions/rest/v1/e2e.ts @@ -15,4 +15,7 @@ export type E2eEndpoints = { 'e2e.setRoomKeyID': { POST: (params: { rid: string; keyID: string }) => {}; }; + 'e2e.fetchMyKeys': { + GET: () => { public_key: string; private_key: string }; + }; }; diff --git a/app/lib/rocketchat/rocketchat.js b/app/lib/rocketchat/rocketchat.js index 6396d5e8a..71d208f1b 100644 --- a/app/lib/rocketchat/rocketchat.js +++ b/app/lib/rocketchat/rocketchat.js @@ -186,7 +186,6 @@ const RocketChat = { async e2eFetchMyKeys() { // RC 0.70.0 - const sdk = this.shareSDK || this.sdk; const result = await sdk.get('e2e.fetchMyKeys'); // snake_case -> camelCase if (result.success) {