ta.status === 0) {
                    $("#2fa").modal('hide');
                } else {
                    alert(data.msg);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(errorThrown + ' : ' + XMLHttpRequest.responseText);
            }
        })
        return result
    }

    function save() {
        $.ajax({
            type: "post",
            url: "/api/v1/user/2fa/save/",
            dataType: "json",
            dat