<commit_before>//loginService.js

var userService = (function () {
	
	/*function getExercise(id) {
		return $.ajax({
		  method: "GET",
		  url: "exercise/" + id,
		});
	}

	function deleteExercise (id) {
		return $.ajax({
		  method: "DELETE",
		  url: "exercise/" + id,
		});
	}


	function updateExercise(id, exercise) {
		return $.ajax({
		  type: "PUT",
		  url: "/exercise/" + id,
		  data: exercise,
		});
	}

	function getExercises() {
		return $.ajax({
		  method: "GET",
		  url: "exercise",
		});
	}

*/



	function login(loginData) {
		return $.ajax({
		  type: "POST",
		  url: "/user/login",
		  data: loginData,
		});
	}


	function logout() {
		return $.ajax({
		  type: "POST",
		  url: "/user/logout"
		});
	}


	return {
		login: login
	}

})();<commit_msg>added user service functions<commit_after>//loginService.js

var userService = (function () {
	
	function getUser(id) {
		return $.ajax({
		  method: "GET",
		  url: "user/" + id,
		});
	}

	function deleteUser (id) {
		return $.ajax({
		  method: "DELETE",
		  url: "user/" + id,
		});
	}

	function updateUser(id, user) {
		return $.ajax({
		  type: "PUT",
		  url: "/user/" + id,
		  data: user,
		});
	}

	function getUsers() {
		return $.ajax({
		  method: "GET",
		  url: "user",
		});
	}

	function login(loginData) {
		return $.ajax({
		  type: "POST",
		  url: "/user/login",
		  data: loginData,
		});
	}


	function logout() {
		return $.ajax({
		  type: "POST",
		  url: "/user/logout"
		});
	}


	return {
		login: login
	}

})();
{'fraction_non_alphanumeric': 0.19736842105263158, 'fraction_numerical': 0.0, 'mean_word_length': 2.4489795918367347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6404188', 'n_tokens_mistral': 670, 'n_tokens_neox': 560, 'n_words': 131}