0

i add spring boot starter security to my project but when i tried use a function named delete ajax nothing work . it work normally without spring boot starter security.

i need that option work

this ajax function

function deleteClient(cin) {


    swal({
        title: "Are you sure?",
        text: "Once deleted, you will not be able to recover this client!",
        icon: "warning",
        buttons: true,
        dangerMode: true,
    })
        .then((willDelete) => {
            if (willDelete) {

                $.ajax({
                    url: '/clients/delete-ajax',
                    type: 'POST',  // http method
                    data: { 'cin': cin },  // data to submit
                    success: function() {
                        $("#" + cin).remove();
                        swal("Poof! Your client has been deleted!", {
                            icon: "success",
                        });
                    }
                });


            } else {
                swal("Your client is safe!");
            }
        });





}

0 Answers0