29 lines
806 B
TypeScript
29 lines
806 B
TypeScript
// Metro module 9187 (f9188).
|
|
import { Endpoints } from "../../Constants";
|
|
import TrackedHTTPUtils from "../../utils/TrackedHTTPUtils";
|
|
import { NetworkActionNames } from "../../_bundle/Module503";
|
|
export function sendConfirmationCode(is_resend = false) {
|
|
return TrackedHTTPUtils.put({
|
|
url: Endpoints.USER_EMAIL,
|
|
trackedActionData: {
|
|
event: NetworkActionNames.USER_ACCOUNT_EMAIL_CHANGE_SEND_CODE,
|
|
properties: {
|
|
is_resend
|
|
}
|
|
},
|
|
rejectWithError: false
|
|
});
|
|
}
|
|
export async function confirmEmailChange(code) {
|
|
return (await TrackedHTTPUtils.post({
|
|
url: Endpoints.USER_EMAIL_VERIFY_CODE,
|
|
body: {
|
|
code
|
|
},
|
|
trackedActionData: {
|
|
event: NetworkActionNames.USER_ACCOUNT_EMAIL_CHANGE_VERIFY_CODE
|
|
},
|
|
rejectWithError: false
|
|
})).body;
|
|
}
|