Meteor.call callback error? But still functioning


#1

DatePicker.html:

  <script type="text/javascript">

        $(function () {

            $("#submit").click(function () {

                console.log('Bootstrap submit clicked!');
                var date_start = $("#datetimepicker6").find("input").val();
                var date_end = $("#datetimepicker7").find("input").val();
                var userid = $("#tb").val();

// Below Meteor.call complaints that expression statement is not assigned? But still works?

                 Meteor.call('addTestTicket', userid, date_start, date_end, (error, data) => {
                    if (error) {
                        Bert.alert('Please login before trying to submit!', 'danger', 'growl-top-right', 'fa-frown-o');
                    } else {
                        Bert.alert({title: 'Test Sent', message: 'now in queue', type: 'info', style: 'growl-top-right', icon: 'fa-music'});
                        Meteor.setTimeout(function(){window.location.href = '/';}, 3000);
                }); 
            });
        });
    </script>
</template>

entry.jsx:

This is my signature

Meteor.methods({

addTestTicket: function (text, start_date, end_date) {

}
})