{"action":"created","comment":{"url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/comments/47595413","id":47595413,"diff_hunk":"@@ -0,0 +1,53 @@\n+'use strict';\n+\n+/**\n+ * @ngdoc function\n+ * @name flightNodeApp.controller.location:LocationCreateController\n+ * @description\n+ * # LocationCreateController\n+ * Controller for the create work type page.\n+ */\n+angular.module('flightNodeApp')\n+\t.controller('LocationCreateController',\n+\t\t['$scope', '$http', '$log', '$location', 'messenger', 'oauthRequest',\n+\t\t\tfunction ($scope, $http, $log, $location, messenger, oauthRequest) {\n+\n+\t\t\t\t$scope.loading = true;\n+\n+\t\t\t\t$scope.cancel = function () {\n+\t\t\t\t\t$location.path('/locations');\n+\t\t\t\t}\n+\n+\t\t\t\t$scope.submit = function () {\n+\t\t\t\t\t$scope.loading = true;\n+\n+\t\t\t\t\toauthRequest.post('http://localhost:50323/api/v1/locations', $scope.location)\n+\t\t\t\t\t\t.then(function success(response) {\n+\n+\t\t\t\t\t\t\tmessenger.showSuccessMessage($scope, 'Saved');\n+\t\t\t\t\t\t\t$scope.loading = false;\n+\n+\t\t\t\t\t\t}, function error(response) {\n+\n+\t\t\t\t\t\t\tswitch (response.status) {\n+\t\t\t\t\t\t\t\tcase 400:\n+\t\t\t\t\t\t\t\t\tvar messages = [{ error: response.data.message }];\n+\t\t\t\t\t\t\t\t\tif (response.data.modelState) {\n+\t\t\t\t\t\t\t\t\t\t_.forIn(response.data.modelState, function (value, key) {\n+\t\t\t\t\t\t\t\t\t\t\tmessages.push({ error: value.toString() });\n+\t\t\t\t\t\t\t\t\t\t});\n+\t\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t\t\tmessenger.showErrorMessage($scope, messages);","path":"src/app/controllers/location/create.js","position":40,"original_position":40,"commit_id":"034cce91f3d5c77a9dc15b66e8435882f007c9a6","original_commit_id":"034cce91f3d5c77a9dc15b66e8435882f007c9a6","user":{"login":"stephenfuqua","id":9324390,"avatar_url":"https://avatars.githubusercontent.com/u/9324390?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenfuqua","html_url":"https://github.com/stephenfuqua","followers_url":"https://api.github.com/users/stephenfuqua/followers","following_url":"https://api.github.com/users/stephenfuqua/following{/other_user}","gists_url":"https://api.github.com/users/stephenfuqua/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenfuqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenfuqua/subscriptions","organizations_url":"https://api.github.com/users/stephenfuqua/orgs","repos_url":"https://api.github.com/users/stephenfuqua/repos","events_url":"https://api.github.com/users/stephenfuqua/events{/privacy}","received_events_url":"https://api.github.com/users/stephenfuqua/received_events","type":"User","site_admin":false},"body":"This does have the risk of exposing more internal details than i would like to the user, so it needs to be fine-tuned. ","created_at":"2015-12-15T04:21:07Z","updated_at":"2015-12-15T04:21:07Z","html_url":"https://github.com/FlightNode/FlightNode.Demo/pull/6#discussion_r47595413","pull_request_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/comments/47595413"},"html":{"href":"https://github.com/FlightNode/FlightNode.Demo/pull/6#discussion_r47595413"},"pull_request":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6","id":53658459,"html_url":"https://github.com/FlightNode/FlightNode.Demo/pull/6","diff_url":"https://github.com/FlightNode/FlightNode.Demo/pull/6.diff","patch_url":"https://github.com/FlightNode/FlightNode.Demo/pull/6.patch","issue_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/6","number":6,"state":"open","locked":false,"title":"Several new screens","user":{"login":"stephenfuqua","id":9324390,"avatar_url":"https://avatars.githubusercontent.com/u/9324390?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenfuqua","html_url":"https://github.com/stephenfuqua","followers_url":"https://api.github.com/users/stephenfuqua/followers","following_url":"https://api.github.com/users/stephenfuqua/following{/other_user}","gists_url":"https://api.github.com/users/stephenfuqua/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenfuqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenfuqua/subscriptions","organizations_url":"https://api.github.com/users/stephenfuqua/orgs","repos_url":"https://api.github.com/users/stephenfuqua/repos","events_url":"https://api.github.com/users/stephenfuqua/events{/privacy}","received_events_url":"https://api.github.com/users/stephenfuqua/received_events","type":"User","site_admin":false},"body":"* Work log\r\n* Work types\r\n* Locations\r\n\r\nAlso logout functionality.","created_at":"2015-12-15T04:18:15Z","updated_at":"2015-12-15T04:21:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"973fd2a08e13485d1f8d627c7ca123c1e67a7c90","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6/commits","review_comments_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6/comments","review_comment_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/6/comments","statuses_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/statuses/034cce91f3d5c77a9dc15b66e8435882f007c9a6","head":{"label":"stephenfuqua:develop","ref":"develop","sha":"034cce91f3d5c77a9dc15b66e8435882f007c9a6","user":{"login":"stephenfuqua","id":9324390,"avatar_url":"https://avatars.githubusercontent.com/u/9324390?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenfuqua","html_url":"https://github.com/stephenfuqua","followers_url":"https://api.github.com/users/stephenfuqua/followers","following_url":"https://api.github.com/users/stephenfuqua/following{/other_user}","gists_url":"https://api.github.com/users/stephenfuqua/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenfuqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenfuqua/subscriptions","organizations_url":"https://api.github.com/users/stephenfuqua/orgs","repos_url":"https://api.github.com/users/stephenfuqua/repos","events_url":"https://api.github.com/users/stephenfuqua/events{/privacy}","received_events_url":"https://api.github.com/users/stephenfuqua/received_events","type":"User","site_admin":false},"repo":{"id":43253212,"name":"FlightNode.Demo","full_name":"stephenfuqua/FlightNode.Demo","owner":{"login":"stephenfuqua","id":9324390,"avatar_url":"https://avatars.githubusercontent.com/u/9324390?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenfuqua","html_url":"https://github.com/stephenfuqua","followers_url":"https://api.github.com/users/stephenfuqua/followers","following_url":"https://api.github.com/users/stephenfuqua/following{/other_user}","gists_url":"https://api.github.com/users/stephenfuqua/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenfuqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenfuqua/subscriptions","organizations_url":"https://api.github.com/users/stephenfuqua/orgs","repos_url":"https://api.github.com/users/stephenfuqua/repos","events_url":"https://api.github.com/users/stephenfuqua/events{/privacy}","received_events_url":"https://api.github.com/users/stephenfuqua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenfuqua/FlightNode.Demo","description":"Demonstration / reference web site","fork":true,"url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo","forks_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/forks","keys_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/teams","hooks_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/hooks","issue_events_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/issues/events{/number}","events_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/events","assignees_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/assignees{/user}","branches_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/branches{/branch}","tags_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/tags","blobs_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/languages","stargazers_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/stargazers","contributors_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/contributors","subscribers_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/subscribers","subscription_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/subscription","commits_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/contents/{+path}","compare_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/merges","archive_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/downloads","issues_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/issues{/number}","pulls_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/labels{/name}","releases_url":"https://api.github.com/repos/stephenfuqua/FlightNode.Demo/releases{/id}","created_at":"2015-09-27T15:59:29Z","updated_at":"2015-12-14T04:52:30Z","pushed_at":"2015-12-15T04:17:12Z","git_url":"git://github.com/stephenfuqua/FlightNode.Demo.git","ssh_url":"git@github.com:stephenfuqua/FlightNode.Demo.git","clone_url":"https://github.com/stephenfuqua/FlightNode.Demo.git","svn_url":"https://github.com/stephenfuqua/FlightNode.Demo","homepage":null,"size":437,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"FlightNode:develop","ref":"develop","sha":"9861aa5bbc931550d424bc1d35a01553cb1e0671","user":{"login":"FlightNode","id":14436548,"avatar_url":"https://avatars.githubusercontent.com/u/14436548?v=3","gravatar_id":"","url":"https://api.github.com/users/FlightNode","html_url":"https://github.com/FlightNode","followers_url":"https://api.github.com/users/FlightNode/followers","following_url":"https://api.github.com/users/FlightNode/following{/other_user}","gists_url":"https://api.github.com/users/FlightNode/gists{/gist_id}","starred_url":"https://api.github.com/users/FlightNode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlightNode/subscriptions","organizations_url":"https://api.github.com/users/FlightNode/orgs","repos_url":"https://api.github.com/users/FlightNode/repos","events_url":"https://api.github.com/users/FlightNode/events{/privacy}","received_events_url":"https://api.github.com/users/FlightNode/received_events","type":"Organization","site_admin":false},"repo":{"id":43253201,"name":"FlightNode.Demo","full_name":"FlightNode/FlightNode.Demo","owner":{"login":"FlightNode","id":14436548,"avatar_url":"https://avatars.githubusercontent.com/u/14436548?v=3","gravatar_id":"","url":"https://api.github.com/users/FlightNode","html_url":"https://github.com/FlightNode","followers_url":"https://api.github.com/users/FlightNode/followers","following_url":"https://api.github.com/users/FlightNode/following{/other_user}","gists_url":"https://api.github.com/users/FlightNode/gists{/gist_id}","starred_url":"https://api.github.com/users/FlightNode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlightNode/subscriptions","organizations_url":"https://api.github.com/users/FlightNode/orgs","repos_url":"https://api.github.com/users/FlightNode/repos","events_url":"https://api.github.com/users/FlightNode/events{/privacy}","received_events_url":"https://api.github.com/users/FlightNode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FlightNode/FlightNode.Demo","description":"Demonstration / reference web site","fork":false,"url":"https://api.github.com/repos/FlightNode/FlightNode.Demo","forks_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/forks","keys_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/teams","hooks_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/hooks","issue_events_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/events{/number}","events_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/events","assignees_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/assignees{/user}","branches_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/branches{/branch}","tags_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/tags","blobs_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/git/refs{/sha}","trees_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/statuses/{sha}","languages_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/languages","stargazers_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/stargazers","contributors_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/contributors","subscribers_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/subscribers","subscription_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/subscription","commits_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/commits{/sha}","git_commits_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/git/commits{/sha}","comments_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/comments{/number}","issue_comment_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/comments{/number}","contents_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/contents/{+path}","compare_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/merges","archive_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/downloads","issues_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues{/number}","pulls_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls{/number}","milestones_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/milestones{/number}","notifications_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/labels{/name}","releases_url":"https://api.github.com/repos/FlightNode/FlightNode.Demo/releases{/id}","created_at":"2015-09-27T15:59:12Z","updated_at":"2015-10-30T03:02:08Z","pushed_at":"2015-12-15T04:18:15Z","git_url":"git://github.com/FlightNode/FlightNode.Demo.git","ssh_url":"git@github.com:FlightNode/FlightNode.Demo.git","clone_url":"https://github.com/FlightNode/FlightNode.Demo.git","svn_url":"https://github.com/FlightNode/FlightNode.Demo","homepage":null,"size":604,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6"},"html":{"href":"https://github.com/FlightNode/FlightNode.Demo/pull/6"},"issue":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/6"},"comments":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/FlightNode/FlightNode.Demo/statuses/034cce91f3d5c77a9dc15b66e8435882f007c9a6"}}}}