diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-15 18:55:33 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-15 18:55:33 +0300 |
commit | 9fcdcf854ce3ad6078fff9a82ad172e2605d6084 (patch) | |
tree | 7fbebdb995f779769106ce3e3502d145ef0f4def /protocols | |
parent | b39e2087e034546e7de1ee9c9f5ce5e34080c91b (diff) |
minor code cleaning
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/mfa.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Discord/src/mfa.cpp b/protocols/Discord/src/mfa.cpp index 5962efc60d..852dbffb4d 100644 --- a/protocols/Discord/src/mfa.cpp +++ b/protocols/Discord/src/mfa.cpp @@ -55,6 +55,7 @@ public: cmbAnother.AddString(TranslateT("Use a code sent to your phone"), 1); cmbAnother.AddString(TranslateT("Use a backup code"), 2); cmbAnother.SetCurSel(0); + onChange_Combo(0); return true; } @@ -63,15 +64,14 @@ public: JSONNode root; root << CHAR_PARAM("ticket", m_szTicket); - const char *wszUrl; + AsyncHttpRequest *pReq; ptrW wszCode(edtCode.GetText()); if (mir_wstrlen(wszCode)) { - wszUrl = (m_mode == 1) ? "/auth/mfa/sms" : "/auth/mfa/totp"; root << WCHAR_PARAM("code", wszCode); + pReq = new AsyncHttpRequest(m_proto, REQUEST_POST, (m_mode == 1) ? "/auth/mfa/sms" : "/auth/mfa/totp", &CDiscordProto::OnSendTotp, &root); } - else wszUrl = "/auth/mfa/sms/send"; + else pReq = new AsyncHttpRequest(m_proto, REQUEST_POST, "/auth/mfa/sms/send", 0, &root); - auto *pReq = new AsyncHttpRequest(m_proto, REQUEST_POST, wszUrl, &CDiscordProto::OnSendTotp, &root); pReq->pUserInfo = this; m_proto->Push(pReq); return false; |