mirror of
https://github.com/siv-org/siv.git
synced 2026-01-09 10:27:57 -05:00
/malware-check: Send OTP w/ confirmations
This commit is contained in:
@@ -141,15 +141,16 @@ function PageContent() {
|
||||
const columns = useMemo(() => generateColumnNames({ ballot_design }).columns, [ballot_design])
|
||||
|
||||
const handleConfirm = async (confirmed: boolean) => {
|
||||
if (!confirmed) return setShowIssueForm(true)
|
||||
|
||||
try {
|
||||
const response = await api('/malware-check', {
|
||||
auth_token,
|
||||
confirmed: true,
|
||||
confirmed,
|
||||
election_id,
|
||||
otp: checkResult?.otp,
|
||||
})
|
||||
|
||||
if (!confirmed) return setShowIssueForm(true)
|
||||
|
||||
if (response.ok) setConfirmed(true)
|
||||
} catch (error) {
|
||||
// Handle error
|
||||
@@ -164,6 +165,7 @@ function PageContent() {
|
||||
confirmed: false,
|
||||
election_id,
|
||||
issue_description: issueDescription,
|
||||
otp: checkResult?.otp,
|
||||
})
|
||||
|
||||
if (response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user