<commit_before>'use strict';

/* Controllers */

angular.module('app.controllers', []).
	// main page(first) of application. Search photos by tag
	controller('ControllerMain', ["Instagram", '$scope', "CLIENT_ID", "CLIENT_SECRET", '$http', function(instagram, $scope, CLIENT_ID, CLIENT_SECRET, $http){
		
		//instagram.postComment({photoId:"749707591986885447_42689779", text:'text - ololo'});
		$http({
			url:"https://api.instagram.com/v1/media/749707591986885447_42689779/comments?client_id="+CLIENT_ID+"&access_token="+CLIENT_SECRET+"&callback=JSON_CALLBACK",
			method:'POST',
			headers: { 'Content-Type': 'application/json' },
			data: {text:"dfsdf"}
		});
		$scope.tagValue = '';
	
		this.search = function(tag){
			this._getImages({
				tag: tag,
				replace:true
			});
		};
		
		this.getComments = function(photoId){
			var self = this;
			instagram.getComments({'photoId':photoId}, function(response){
				angular.forEach(self.photos, function(image, index){
					if(self.photos[index].id === photoId){
						self.photos[index].comments.data = response.data;
					}
				});<commit_msg>Update controllers.js<commit_after>'use strict';

/* Controllers */

angular.module('app.controllers', []).
	// main page(first) of application. Search photos by tag
	controller('ControllerMain', ["Instagram", '$scope', "CLIENT_ID", "CLIENT_SECRET", '$http', function(instagram, $scope, CLIENT_ID, CLIENT_SECRET, $http){
		
		//instagram.postComment({photoId:"749707591986885447_42689779", text:'text - ololo'});
		$http({
			url:"https://api.instagram.com/v1/media/749707591986885447_42689779/comments?client_id="+CLIENT_ID+"&access_token="+CLIENT_SECRET+"&callback=JSON_CALLBACK",
			method:'POST',
			headers: { 'Content-Type': 'application/json',
				'Access-Control-Allow-Origin':'*'
			},
			data: {text:"dfsdf"}
		});
		$scope.tagValue = '';
	
		this.search = function(tag){
			this._getImages({
				tag: tag,
				replace:true
			});
		};
		
		this.getComments = function(photoId){
			var self = this;
			instagram.getComments({'photoId':photoId}, function(response){
				angular.forEach(self.photos, function(image, index){
					if(self.photos[index].id === photoId){
						self.photos[index].comments.data = response.data;
					}
				});
{'fraction_non_alphanumeric': 0.17975022301516502, 'fraction_numerical': 0.04727921498661909, 'mean_word_length': 4.692893401015229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1509733', 'n_tokens_mistral': 941, 'n_tokens_neox': 760, 'n_words': 112}