<commit_before>angular.module("flooshie", [])
.controller("toiletCtrl", ["$scope", "$http", function($scope, $http){
    
    if(localStorage["flushes"]){
    var flushCount = JSON.parse(localStorage.getItem("flushCount"));
} else {
    localStorage.setItem("flushCount",JSON.stringify({}));
    var flushCount = {} ;
};
    
     $scope.accessToken = "4fdb248ad771e101c196f31e5be93dffaa247d6994ebe490e303c1e55f1970ed";
    
    $scope.deviceId1 = "00e04c035ad5";
    $scope.URL1 = "https://api-http.littlebitscloud.cc/devices/" + $scope.deviceId1 + "/output";
    
    $scope.deviceId2 = "243c200bf913";
    $scope.URL2 = "https://api-http.littlebitscloud.cc/devices/" + $scope.deviceId2 + "/output";
    
    $http.defaults.headers.common.Authorization = "Bearer " + $scope.accessToken;
    
    $scope.poo = function(){
        console.log("POO");
        $http.post($scope.URL2, {percent: 100, duration_ms: 2000})
        .success(function(data){
            alert("Flooshed!");
        })
    $scope.pee = function(){
        console.log("PEE");
        $http.post($scope.URL1, {percent: 100, duration_ms: 2000})
        .success(function(data){
            alert("Flooshed!");
        })
        .error(function(err){
            console.log(err);
        });
    };
}]);

<commit_msg>Fixed some JS errors<commit_after>angular.module("flooshie", [])
.controller("toiletCtrl", ["$scope", "$http", function($scope, $http){
    
    if(localStorage["flushes"]){
    var flushCount = JSON.parse(localStorage.getItem("flushCount"));
} else {
    localStorage.setItem("flushCount",JSON.stringify({}));
    var flushCount = {} ;
};
    
     $scope.accessToken = "4fdb248ad771e101c196f31e5be93dffaa247d6994ebe490e303c1e55f1970ed";
    
    $scope.deviceId1 = "00e04c035ad5";
    $scope.URL1 = "https://api-http.littlebitscloud.cc/devices/" + $scope.deviceId1 + "/output";
    
    $scope.deviceId2 = "243c200bf913";
    $scope.URL2 = "https://api-http.littlebitscloud.cc/devices/" + $scope.deviceId2 + "/output";
    
    $http.defaults.headers.common.Authorization = "Bearer " + $scope.accessToken;
    
    $scope.poo = function(){
        console.log("POO");
        $http.post($scope.URL2, {percent: 100, duration_ms: 2000})
        .success(function(data){
            alert("Flooshed!");
        })
    };
    $scope.pee = function(){
        console.log("PEE");
        $http.post($scope.URL1, {percent: 100, duration_ms: 2000})
        .success(function(data){
            alert("Flooshed!");
        })
        .error(function(err){
            console.log(err);
        });
    };
}]);


{'fraction_non_alphanumeric': 0.17950693374422189, 'fraction_numerical': 0.059322033898305086, 'mean_word_length': 2.9288956127080183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '595628', 'n_tokens_mistral': 983, 'n_tokens_neox': 885, 'n_words': 109}