      $.ajax({
            type: "post",
            url: "/api/v1/user/2fa/state/",
            dataType: "json",
            data: {
                engineer: '{{ user.username }}'
            },
            complete: function () {
            },
            success: function (data) {
                if (data.status === 0) {
                    if (data.data.totp === 'enabled') {
                        $("#totp-switch").val('true');
                    } else {
                        $("#totp-switch").v