Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3342506
D9424.id31802.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9424.id31802.diff
View Options
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -90,12 +90,9 @@
const deleteAccount =
(
callServerEndpoint: CallServerEndpoint,
- ): ((
- password: ?string,
- preRequestUserState: PreRequestUserState,
- ) => Promise<LogOutResult>) =>
- async (password, preRequestUserState) => {
- const response = await callServerEndpoint('delete_account', { password });
+ ): ((preRequestUserState: PreRequestUserState) => Promise<LogOutResult>) =>
+ async preRequestUserState => {
+ const response = await callServerEndpoint('delete_account');
return { currentUserInfo: response.currentUserInfo, preRequestUserState };
};
diff --git a/native/profile/delete-account.react.js b/native/profile/delete-account.react.js
--- a/native/profile/delete-account.react.js
+++ b/native/profile/delete-account.react.js
@@ -46,7 +46,6 @@
+dispatchActionPromise: DispatchActionPromise,
// async functions that hit server APIs
+deleteAccount: (
- password: ?string,
preRequestUserState: PreRequestUserState,
) => Promise<LogOutResult>,
};
@@ -158,7 +157,6 @@
try {
await deleteNativeCredentialsFor();
const result = await this.props.deleteAccount(
- this.state.password,
this.props.preRequestUserState,
);
return result;
diff --git a/web/settings/account-delete-modal.react.js b/web/settings/account-delete-modal.react.js
--- a/web/settings/account-delete-modal.react.js
+++ b/web/settings/account-delete-modal.react.js
@@ -32,7 +32,6 @@
+inputDisabled: boolean,
+dispatchActionPromise: DispatchActionPromise,
+deleteAccount: (
- password: ?string,
preRequestUserState: PreRequestUserState,
) => Promise<LogOutResult>,
+popModal: () => void,
@@ -151,7 +150,6 @@
async deleteAction() {
try {
const response = await this.props.deleteAccount(
- this.state.currentPassword,
this.props.preRequestUserState,
);
this.props.popModal();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 1:26 AM (17 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2555216
Default Alt Text
D9424.id31802.diff (2 KB)
Attached To
Mode
D9424: [lib][native][web] Stop passing password up to deleteAccount endpoint
Attached
Detach File
Event Timeline
Log In to Comment