I have made API and trying use it in my jQuery scripts. But having problems with callbacks. My JavaScript:
function findAll() {
    var users;
    $.ajax({
        url: "/user",
        type: "GET",
        dataType: "json",
        success: function (data) {
            users = data;
        }
    });
    return users;
}
Help me return received data, please. Thanks in advance.
 
    