DevOpsPlayground/directory-react-nodejs

View on GitHub
www/js/data-service.js

Summary

Maintainability
A
0 mins
Test Coverage
employeeService = (function () {

    var baseURL = "";

    // The public API
    return {
        findById: function(id) {
            console.log("Testing")
            return $.ajax(baseURL + "/employees/" + id);
        },
        findByName: function(searchKey) {
            return $.ajax({url: baseURL + "/employees", data: {name: searchKey}});
        }
    };

}());