<commit_before>/**
 * Defines a constant which holds the base url of the API
 */
app.constant("CATEGORY_ENDPOINT", "php/api/category/");

/**
 * Initializes our category service
 *
 * Notice we inject the $http service, we use this to make REST calls
 * We also inject our endpoint so that it's usable inside the service
 */
app.service("FeedbackService", function($http, FEEDBACK_ENDPOINT) {

	/**
	 * Returns the tweet endpoint for use in other methods
	 */
	function getUrl() {
		return(CATEGORY_ENDPOINT);
	}

	/**
	 * Builds a URL for getting a category  by ID
	 */
	function getUrlForId(categoryId) {
		return(getUrl() + categoryId);
	}

	/**
	 * GETS all category
	 */
	this.all = function() {
		return($http.get(getUrl()));
	};

	/**
	 * GETS a category by ID
	 */
	this.fetch = function(categoryId) {
		return($http.get(getUrlForId(categoryId)));
	};

	/**
	 * GETS feedback by feedback party id
	 **/
	this.fetchByCategoryName = function(categoryName) {
		return($http.get(getUrl() + "?categoryName=" + categoryName));
	};

	/**
	 * GET feedback by feedback Sender id
	 **/
	this.fetchByFeedbackSenderId = function(feedbackSenderId) {
		return($http.get(getUrl() + "?feedbackSenderId=" + feedbackSenderId));
	};

	/**
	 * GET feedback by feedback recipient id
	 **/
	this.fetchByFeedbackRecipientId = function(feedbackRecipientId) {
		returne($http.get(getUrl() + "?feedbackRecipientId=" + feedbackRecipientId));
	};
	/**
	 * POSTS feedback
	 */
	this.create = function(feedback) {
		return($http.post(getUrl(), feedback));
	};

	/**
	 * PUTS a tweet
	 */
	this.update = function(feedbackId, feedback) {
		return($http.put(getUrlForId(feedbackId), feedback));
	};

	/**
	 * DELETES a feedback
	 */
	this.destroy = function(feedbackId) {
		return($http.delete(getUrlForId(feedbackId)));
	};
});<commit_msg>might be done with category service only time will tell.<commit_after>/**
 * Defines a constant which holds the base url of the API
 */
app.constant("CATEGORY_ENDPOINT", "php/api/category/");

/**
 * Initializes our category service
 *
 * Notice we inject the $http service, we use this to make REST calls
 * We also inject our endpoint so that it's usable inside the service
 */
app.service("FeedbackService", function($http, FEEDBACK_ENDPOINT) {

	/**
	 * Returns the tweet endpoint for use in other methods
	 */
	function getUrl() {
		return(CATEGORY_ENDPOINT);
	}

	/**
	 * Builds a URL for getting a category  by ID
	 */
	function getUrlForId(categoryId) {
		return(getUrl() + categoryId);
	}

	/**
	 * GETS all category
	 */
	this.all = function() {
		return($http.get(getUrl()));
	};

	/**
	 * GETS a category by ID
	 */
	this.fetch = function(categoryId) {
		return($http.get(getUrlForId(categoryId)));
	};

	/**
	 * GETS category by category name
	 **/
	this.fetchByCategoryName = function(categoryName) {
		return($http.get(getUrl() + "?categoryName=" + categoryName));
	};

	/**
	 * POSTS category
	 */
	this.create = function(category) {
		return($http.post(getUrl(), category));
	};

	/**
	 * PUTS a category
	 */
	this.update = function(categoryId, category) {
		return($http.put(getUrlForId(categoryId), category));
	};

	/**
	 * DELETES a feedback
	 */
	this.destroy = function(categoryId) {
		return($http.delete(getUrlForId(categoryId)));
	};
});
{'fraction_non_alphanumeric': 0.15035071668191521, 'fraction_numerical': 0.0, 'mean_word_length': 3.859259259259259, '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': '5550832', 'n_tokens_mistral': 1139, 'n_tokens_neox': 1043, 'n_words': 262}