ajax调用执行两次

Hello Everyone i have modal dialog that trigger database insertion when it has been closed. However when i check my table in DB i often duplicate insertion. The insertion is done thru ajax call. Here is my source code

$(`#closingModal-${alertId}`).on('hidden.bs.modal', function (e)
{
     //..Load la map pour la localisation du badge d'alerte
    loadMapByMacAddress(macAddress)


    //..Inserer dans la BD le nom de l'utilisateur qui a ferme le modal
    const alarmId = parseInt(alertId.replace('alerte', ''));
    $.ajax({
        url: "/Observer/SetStopDynamicAlarm",
        type: "POST",
        data: {
            LastUpdate: dateFermeture.toJSON(),
            AlarmId: alarmId
        }
    });


    $(this).remove();



});

I don't really any error in the above source code. Any help woud be appreciated. Thanks