Add call verification

This commit is contained in:
binwiederhier 2023-05-16 22:27:48 -04:00
parent 496d6e74b0
commit 2c81773d01
11 changed files with 93 additions and 74 deletions

View file

@ -299,14 +299,15 @@ class AccountApi {
return await response.json(); // May throw SyntaxError
}
async verifyPhoneNumber(phoneNumber) {
async verifyPhoneNumber(phoneNumber, channel) {
const url = accountPhoneVerifyUrl(config.base_url);
console.log(`[AccountApi] Sending phone verification ${url}`);
await fetchOrThrow(url, {
method: "PUT",
headers: withBearerAuth({}, session.token()),
body: JSON.stringify({
number: phoneNumber
number: phoneNumber,
channel: channel
})
});
}