GitHub PullRequestReviewCommentEvent at 2014-10-08 13:42:28
Repository: team-bank-observe
Actor: ghristov
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/comments/18582337","id":18582337,"diff_hunk":"@@ -0,0 +1,118 @@\n+/**\n+ * Created by emil on 14-9-26.\n+ */\n+angular.module('transaction', ['ui.router'])\n+\n+    .config(['$stateProvider', '$httpProvider', function ($stateProvider, $httpProvider) {\n+        $stateProvider.state('transaction', {\n+            url: '/transaction',\n+            views: {\n+                \"main\": {\n+                    templateUrl: 'transaction/transaction.tpl.html',\n+                    controller: 'TransactionCtrl'\n+                }\n+            },\n+            data: {pageTitle: 'Transaction'}\n+        });\n+\n+        $httpProvider.interceptors.push('unauthorisedInterceptor');\n+    }])\n+\n+    .factory('unauthorisedInterceptor', ['$q', 'windowService', function ($q, windowService) {\n+\n+        return {\n+            'responseError': function (rejection) {\n+                if (rejection.status === 401) {\n+                    windowService.redirect();\n+                }\n+\n+                return $q.reject(rejection);\n+            }\n+\n+        };\n+\n+    }])\n+\n+    .factory('windowService', ['$window', function ($window) {\n+        return {\n+            redirect: function () {\n+                $window.location.replace(\"/login\");\n+            }\n+        };\n+    }])\n+\n+    .controller('TransactionCtrl', ['$scope', '$state', 'bankService', function ($scope, $state, bankService) {\n+\n+        $scope.navigateToTransaction = function () {\n+            $state.go('transaction');\n+        };\n+\n+\n+        bankService.fetchCurrentAmount().then(function (amount) {\n+            $scope.currentAmount = amount;\n+        });\n+\n+        $scope.deposit = function (amount) {\n+            bankService.deposit(amount).then(function (data) {\n+                $scope.currentAmount = data.amount;\n+            });\n+        };\n+\n+        $scope.withdraw = function (amount) {\n+\n+            bankService.withdraw(amount).then(function (data) {\n+                $scope.currentAmount = data.amount;\n+            });\n+        };\n+    }])\n+\n+    .service('bankService', ['$http', '$q', function ($http, $q) {\n+\n+        return {\n+            fetchCurrentAmount: function () {\n+                var defer = $q.defer();\n+                $http.get(\"/bankService/getAmount\").success(function (amount) {\n+                    defer.resolve(amount);\n+                });\n+                return defer.promise;\n+            },\n+\n+            deposit: function (amount) {\n+                var defer = $q.defer();\n+                $http.post('/bankService/deposit', {amount: amount}).success(function (amount) {\n+                    defer.resolve(amount);\n+                });\n+                return defer.promise;\n+            },\n+\n+            withdraw: function (amount) {\n+                var defer = $q.defer();\n+                $http.post(\"/bankService/withdraw\", {amount: amount}).success(function (amount) {\n+                    defer.resolve(amount);\n+                });\n+                return defer.promise;\n+            }\n+        };\n+\n+    }])\n+\n+    .directive('amountValidator', function () {\n+\n+        var regexp = /^[1-9][0-9]*(\\.[0-9]{1,2})?$/;","path":"bank-client/src/app/transaction/transaction.js","position":101,"original_position":101,"commit_id":"2f582a4865c3020ea2664340da0f79905d428fc5","original_commit_id":"2f582a4865c3020ea2664340da0f79905d428fc5","user":{"login":"ghristov","id":4025702,"avatar_url":"https://avatars.githubusercontent.com/u/4025702?v=2","gravatar_id":"","url":"https://api.github.com/users/ghristov","html_url":"https://github.com/ghristov","followers_url":"https://api.github.com/users/ghristov/followers","following_url":"https://api.github.com/users/ghristov/following{/other_user}","gists_url":"https://api.github.com/users/ghristov/gists{/gist_id}","starred_url":"https://api.github.com/users/ghristov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghristov/subscriptions","organizations_url":"https://api.github.com/users/ghristov/orgs","repos_url":"https://api.github.com/users/ghristov/repos","events_url":"https://api.github.com/users/ghristov/events{/privacy}","received_events_url":"https://api.github.com/users/ghristov/received_events","type":"User","site_admin":false},"body":"why aren't you using classical form validation and using ng-pattern ?","created_at":"2014-10-08T13:42:28Z","updated_at":"2014-10-08T13:42:28Z","html_url":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1#discussion_r18582337","pull_request_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/comments/18582337"},"html":{"href":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1#discussion_r18582337"},"pull_request":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1","id":22421961,"html_url":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1","diff_url":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1.diff","patch_url":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1.patch","issue_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/1","number":1,"state":"open","locked":false,"title":"Observer","user":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=2","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-08T13:18:30Z","updated_at":"2014-10-08T13:42:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff8eb27e97350b49e45f902af51c5d900259d6d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1/commits","review_comments_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1/comments","review_comment_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/comments/{number}","comments_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/1/comments","statuses_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/statuses/2f582a4865c3020ea2664340da0f79905d428fc5","head":{"label":"EmilGeorgiev:observer","ref":"observer","sha":"2f582a4865c3020ea2664340da0f79905d428fc5","user":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=2","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"repo":{"id":24940514,"name":"team-bank-observe","full_name":"EmilGeorgiev/team-bank-observe","owner":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=2","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EmilGeorgiev/team-bank-observe","description":"","fork":false,"url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe","forks_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/forks","keys_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/teams","hooks_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/hooks","issue_events_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/events{/number}","events_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/events","assignees_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/assignees{/user}","branches_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/branches{/branch}","tags_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/tags","blobs_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/refs{/sha}","trees_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/statuses/{sha}","languages_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/languages","stargazers_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/stargazers","contributors_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/contributors","subscribers_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/subscribers","subscription_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/subscription","commits_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/commits{/sha}","git_commits_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/commits{/sha}","comments_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/comments{/number}","issue_comment_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/comments/{number}","contents_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/contents/{+path}","compare_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/merges","archive_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/downloads","issues_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues{/number}","pulls_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls{/number}","milestones_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/milestones{/number}","notifications_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/labels{/name}","releases_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/releases{/id}","created_at":"2014-10-08T12:55:39Z","updated_at":"2014-10-08T12:55:39Z","pushed_at":"2014-10-08T13:17:30Z","git_url":"git://github.com/EmilGeorgiev/team-bank-observe.git","ssh_url":"git@github.com:EmilGeorgiev/team-bank-observe.git","clone_url":"https://github.com/EmilGeorgiev/team-bank-observe.git","svn_url":"https://github.com/EmilGeorgiev/team-bank-observe","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"EmilGeorgiev:master","ref":"master","sha":"69174d034d378f2f9cb61906a3d1025a980068b2","user":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=2","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"repo":{"id":24940514,"name":"team-bank-observe","full_name":"EmilGeorgiev/team-bank-observe","owner":{"login":"EmilGeorgiev","id":5961191,"avatar_url":"https://avatars.githubusercontent.com/u/5961191?v=2","gravatar_id":"","url":"https://api.github.com/users/EmilGeorgiev","html_url":"https://github.com/EmilGeorgiev","followers_url":"https://api.github.com/users/EmilGeorgiev/followers","following_url":"https://api.github.com/users/EmilGeorgiev/following{/other_user}","gists_url":"https://api.github.com/users/EmilGeorgiev/gists{/gist_id}","starred_url":"https://api.github.com/users/EmilGeorgiev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmilGeorgiev/subscriptions","organizations_url":"https://api.github.com/users/EmilGeorgiev/orgs","repos_url":"https://api.github.com/users/EmilGeorgiev/repos","events_url":"https://api.github.com/users/EmilGeorgiev/events{/privacy}","received_events_url":"https://api.github.com/users/EmilGeorgiev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EmilGeorgiev/team-bank-observe","description":"","fork":false,"url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe","forks_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/forks","keys_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/teams","hooks_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/hooks","issue_events_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/events{/number}","events_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/events","assignees_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/assignees{/user}","branches_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/branches{/branch}","tags_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/tags","blobs_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/refs{/sha}","trees_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/statuses/{sha}","languages_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/languages","stargazers_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/stargazers","contributors_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/contributors","subscribers_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/subscribers","subscription_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/subscription","commits_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/commits{/sha}","git_commits_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/git/commits{/sha}","comments_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/comments{/number}","issue_comment_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/comments/{number}","contents_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/contents/{+path}","compare_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/merges","archive_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/downloads","issues_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues{/number}","pulls_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls{/number}","milestones_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/milestones{/number}","notifications_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/labels{/name}","releases_url":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/releases{/id}","created_at":"2014-10-08T12:55:39Z","updated_at":"2014-10-08T12:55:39Z","pushed_at":"2014-10-08T13:17:30Z","git_url":"git://github.com/EmilGeorgiev/team-bank-observe.git","ssh_url":"git@github.com:EmilGeorgiev/team-bank-observe.git","clone_url":"https://github.com/EmilGeorgiev/team-bank-observe.git","svn_url":"https://github.com/EmilGeorgiev/team-bank-observe","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1"},"html":{"href":"https://github.com/EmilGeorgiev/team-bank-observe/pull/1"},"issue":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/1"},"comments":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/EmilGeorgiev/team-bank-observe/statuses/2f582a4865c3020ea2664340da0f79905d428fc5"}}}}