From 42633913da4715c6bc2ff089ba5a137f1f69b0de Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Fri, 3 Feb 2023 10:45:03 -0800 Subject: [PATCH 1/2] Remove 2 methods that are no longer used in Deprecated API --- src/libs/deprecatedAPI.js | 42 --------------------------------------- 1 file changed, 42 deletions(-) diff --git a/src/libs/deprecatedAPI.js b/src/libs/deprecatedAPI.js index c5e7979d5c2d..d8a9224dd643 100644 --- a/src/libs/deprecatedAPI.js +++ b/src/libs/deprecatedAPI.js @@ -23,46 +23,6 @@ Request.use(Middleware.Retry); // SaveResponseInOnyx - Merges either the successData or failureData into Onyx depending on if the call was successful or not Request.use(Middleware.SaveResponseInOnyx); -/** - * @param {Object} parameters - * @param {String} parameters.authToken - * @param {String} parameters.partnerName - * @param {String} parameters.partnerPassword - * @param {String} parameters.partnerUserID - * @param {String} parameters.partnerUserSecret - * @param {Boolean} [parameters.shouldRetry] - * @param {String} [parameters.email] - * @returns {Promise} - */ -function CreateLogin(parameters) { - const commandName = 'CreateLogin'; - requireParameters([ - 'authToken', - 'partnerName', - 'partnerPassword', - 'partnerUserID', - 'partnerUserSecret', - ], parameters, commandName); - return Network.post(commandName, parameters); -} - -/** - * @param {Object} parameters - * @param {String} parameters.partnerUserID - * @param {String} parameters.partnerName - * @param {String} parameters.partnerPassword - * @param {Boolean} parameters.shouldRetry - * @returns {Promise} - */ -function DeleteLogin(parameters) { - const commandName = 'DeleteLogin'; - requireParameters(['partnerUserID', 'partnerName', 'partnerPassword', 'shouldRetry'], - parameters, commandName); - - // Non-cancellable request: during logout, when requests are cancelled, we don't want to cancel the actual logout request - return Network.post(commandName, {...parameters, canCancel: false}); -} - /** * @param {Object} parameters * @param {String} parameters.returnValueList @@ -123,8 +83,6 @@ function User_SecondaryLogin_Send(parameters) { } export { - CreateLogin, - DeleteLogin, Get, PersonalDetails_Update, ResendValidateCode, From 83347d410d2ea4fa21a2cde9b38b5d128bfab62d Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Fri, 3 Feb 2023 10:58:22 -0800 Subject: [PATCH 2/2] PR Comments --- tests/utils/TestHelper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/TestHelper.js b/tests/utils/TestHelper.js index 8968ab28e8a1..e5a8d560944c 100644 --- a/tests/utils/TestHelper.js +++ b/tests/utils/TestHelper.js @@ -76,7 +76,7 @@ function signInWithTestUser(accountID = 1, login = 'test@user.com', password = ' Session.beginSignIn(login); return waitForPromisesToResolve() .then(() => { - // Response is the same for calls to Authenticate and CreateLogin + // Response is the same for calls to Authenticate and BeginSignIn HttpUtils.xhr .mockImplementation(() => Promise.resolve({ onyxData: [