{"size": 1116, "ext": "js", "max_stars_repo_path": "js/services/settings.js", "max_stars_repo_name": "dmagaha/pmcs_1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/services/settings.js", "max_issues_repo_name": "dmagaha/pmcs_1", "max_issues_repo_issues_event_min_datetime": "2020-05-27T17:30:01.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-22T15:35:10.000Z", "max_forks_repo_path": "js/services/settings.js", "max_forks_repo_name": "dmagaha/pmcs_1", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 28.6153846154, "max_line_length": 58, "alphanum_fraction": 0.5161290323}
taskBoardServices.factory('SettingsService',
['$http',
function($http) {
    return {
        currentUser: function() {
            return $http.get('api/user/current');
        },

        getSettings: function() {
            return $http.get('api/settings');
        },

        addSettings: function(formData) {
            return $http.post('api/settings', {
                tearDownDays: formData.tearDownDays,
                serviceDays: formData.serviceDays,
                refinishDays: formData.refinishDays,
                trimOutDays: formData.trimOutDays,
                hoursInDay: formData.hoursInDay,
                bodyDays: formData.bodyDays
            });
        },

        editTeam: function(formData) {
            return $http.post('api/team/update', {
                name: formData.name,
                currentCapacity: formData.currentCapacity,
                maxCapacity: formData.maxCapacity
            });
        },

        removeTeam: function(teamId) {
            return $http.post('api/team/remove', {
                teamId: teamId
            });
        }
    };
}]);
