{"action":"opened","number":37,"pull_request":{"url":"https://api.github.com/repos/clembou/github-requests/pulls/37","id":183701025,"html_url":"https://github.com/clembou/github-requests/pull/37","diff_url":"https://github.com/clembou/github-requests/pull/37.diff","patch_url":"https://github.com/clembou/github-requests/pull/37.patch","issue_url":"https://api.github.com/repos/clembou/github-requests/issues/37","number":37,"state":"open","locked":false,"title":"Refactor back end code, improve emails","user":{"login":"ceddlyburge","id":13573831,"avatar_url":"https://avatars1.githubusercontent.com/u/13573831?v=4","gravatar_id":"","url":"https://api.github.com/users/ceddlyburge","html_url":"https://github.com/ceddlyburge","followers_url":"https://api.github.com/users/ceddlyburge/followers","following_url":"https://api.github.com/users/ceddlyburge/following{/other_user}","gists_url":"https://api.github.com/users/ceddlyburge/gists{/gist_id}","starred_url":"https://api.github.com/users/ceddlyburge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceddlyburge/subscriptions","organizations_url":"https://api.github.com/users/ceddlyburge/orgs","repos_url":"https://api.github.com/users/ceddlyburge/repos","events_url":"https://api.github.com/users/ceddlyburge/events{/privacy}","received_events_url":"https://api.github.com/users/ceddlyburge/received_events","type":"User","site_admin":false},"body":"Delete the Azure Function. This isn't required and as I understand it is a safeguard against leaving open (unauthenticated) routes. I have refactored the back end server code so that it would now be difficult to leave open routes by mistake.\r\n\r\nImprove the email format. The emails now try and mimic the look and feel of the website. Outlook has terrible support for html emails, so it is not exact, and the styles / html is quite different. This is a shame, but unavoidable.\r\n\r\nRefactor back end code:\r\n\r\n- Separate each endpoint in to its own file\r\n- Separate (nearly) each part of the express app setup in to its own file\r\n- Reduce nesting (and keep intellisense) by `require` ing constants\r\n- Move authenticate to middleware, to make routes simpler and make it harder to add an unathenticated route by mistake.\r\n- Remove unused endpoints","created_at":"2018-04-24T11:13:47Z","updated_at":"2018-04-24T11:13:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clembou/github-requests/pulls/37/commits","review_comments_url":"https://api.github.com/repos/clembou/github-requests/pulls/37/comments","review_comment_url":"https://api.github.com/repos/clembou/github-requests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clembou/github-requests/issues/37/comments","statuses_url":"https://api.github.com/repos/clembou/github-requests/statuses/3036586a3d74b428ba6e1cae3e16cfa980679346","head":{"label":"res-tec-systems:master","ref":"master","sha":"3036586a3d74b428ba6e1cae3e16cfa980679346","user":{"login":"res-tec-systems","id":37331467,"avatar_url":"https://avatars1.githubusercontent.com/u/37331467?v=4","gravatar_id":"","url":"https://api.github.com/users/res-tec-systems","html_url":"https://github.com/res-tec-systems","followers_url":"https://api.github.com/users/res-tec-systems/followers","following_url":"https://api.github.com/users/res-tec-systems/following{/other_user}","gists_url":"https://api.github.com/users/res-tec-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/res-tec-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/res-tec-systems/subscriptions","organizations_url":"https://api.github.com/users/res-tec-systems/orgs","repos_url":"https://api.github.com/users/res-tec-systems/repos","events_url":"https://api.github.com/users/res-tec-systems/events{/privacy}","received_events_url":"https://api.github.com/users/res-tec-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":125352162,"name":"github-requests","full_name":"res-tec-systems/github-requests","owner":{"login":"res-tec-systems","id":37331467,"avatar_url":"https://avatars1.githubusercontent.com/u/37331467?v=4","gravatar_id":"","url":"https://api.github.com/users/res-tec-systems","html_url":"https://github.com/res-tec-systems","followers_url":"https://api.github.com/users/res-tec-systems/followers","following_url":"https://api.github.com/users/res-tec-systems/following{/other_user}","gists_url":"https://api.github.com/users/res-tec-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/res-tec-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/res-tec-systems/subscriptions","organizations_url":"https://api.github.com/users/res-tec-systems/orgs","repos_url":"https://api.github.com/users/res-tec-systems/repos","events_url":"https://api.github.com/users/res-tec-systems/events{/privacy}","received_events_url":"https://api.github.com/users/res-tec-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/res-tec-systems/github-requests","description":"TEC Systems fork of the Request App","fork":true,"url":"https://api.github.com/repos/res-tec-systems/github-requests","forks_url":"https://api.github.com/repos/res-tec-systems/github-requests/forks","keys_url":"https://api.github.com/repos/res-tec-systems/github-requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/res-tec-systems/github-requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/res-tec-systems/github-requests/teams","hooks_url":"https://api.github.com/repos/res-tec-systems/github-requests/hooks","issue_events_url":"https://api.github.com/repos/res-tec-systems/github-requests/issues/events{/number}","events_url":"https://api.github.com/repos/res-tec-systems/github-requests/events","assignees_url":"https://api.github.com/repos/res-tec-systems/github-requests/assignees{/user}","branches_url":"https://api.github.com/repos/res-tec-systems/github-requests/branches{/branch}","tags_url":"https://api.github.com/repos/res-tec-systems/github-requests/tags","blobs_url":"https://api.github.com/repos/res-tec-systems/github-requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/res-tec-systems/github-requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/res-tec-systems/github-requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/res-tec-systems/github-requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/res-tec-systems/github-requests/statuses/{sha}","languages_url":"https://api.github.com/repos/res-tec-systems/github-requests/languages","stargazers_url":"https://api.github.com/repos/res-tec-systems/github-requests/stargazers","contributors_url":"https://api.github.com/repos/res-tec-systems/github-requests/contributors","subscribers_url":"https://api.github.com/repos/res-tec-systems/github-requests/subscribers","subscription_url":"https://api.github.com/repos/res-tec-systems/github-requests/subscription","commits_url":"https://api.github.com/repos/res-tec-systems/github-requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/res-tec-systems/github-requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/res-tec-systems/github-requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/res-tec-systems/github-requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/res-tec-systems/github-requests/contents/{+path}","compare_url":"https://api.github.com/repos/res-tec-systems/github-requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/res-tec-systems/github-requests/merges","archive_url":"https://api.github.com/repos/res-tec-systems/github-requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/res-tec-systems/github-requests/downloads","issues_url":"https://api.github.com/repos/res-tec-systems/github-requests/issues{/number}","pulls_url":"https://api.github.com/repos/res-tec-systems/github-requests/pulls{/number}","milestones_url":"https://api.github.com/repos/res-tec-systems/github-requests/milestones{/number}","notifications_url":"https://api.github.com/repos/res-tec-systems/github-requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/res-tec-systems/github-requests/labels{/name}","releases_url":"https://api.github.com/repos/res-tec-systems/github-requests/releases{/id}","deployments_url":"https://api.github.com/repos/res-tec-systems/github-requests/deployments","created_at":"2018-03-15T10:40:29Z","updated_at":"2018-04-24T11:01:19Z","pushed_at":"2018-04-24T11:01:17Z","git_url":"git://github.com/res-tec-systems/github-requests.git","ssh_url":"git@github.com:res-tec-systems/github-requests.git","clone_url":"https://github.com/res-tec-systems/github-requests.git","svn_url":"https://github.com/res-tec-systems/github-requests","homepage":"","size":549,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"clembou:master","ref":"master","sha":"6508c1d4bbc140d0737c11fae5cb344016242910","user":{"login":"clembou","id":4275603,"avatar_url":"https://avatars3.githubusercontent.com/u/4275603?v=4","gravatar_id":"","url":"https://api.github.com/users/clembou","html_url":"https://github.com/clembou","followers_url":"https://api.github.com/users/clembou/followers","following_url":"https://api.github.com/users/clembou/following{/other_user}","gists_url":"https://api.github.com/users/clembou/gists{/gist_id}","starred_url":"https://api.github.com/users/clembou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clembou/subscriptions","organizations_url":"https://api.github.com/users/clembou/orgs","repos_url":"https://api.github.com/users/clembou/repos","events_url":"https://api.github.com/users/clembou/events{/privacy}","received_events_url":"https://api.github.com/users/clembou/received_events","type":"User","site_admin":false},"repo":{"id":72283273,"name":"github-requests","full_name":"clembou/github-requests","owner":{"login":"clembou","id":4275603,"avatar_url":"https://avatars3.githubusercontent.com/u/4275603?v=4","gravatar_id":"","url":"https://api.github.com/users/clembou","html_url":"https://github.com/clembou","followers_url":"https://api.github.com/users/clembou/followers","following_url":"https://api.github.com/users/clembou/following{/other_user}","gists_url":"https://api.github.com/users/clembou/gists{/gist_id}","starred_url":"https://api.github.com/users/clembou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clembou/subscriptions","organizations_url":"https://api.github.com/users/clembou/orgs","repos_url":"https://api.github.com/users/clembou/repos","events_url":"https://api.github.com/users/clembou/events{/privacy}","received_events_url":"https://api.github.com/users/clembou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clembou/github-requests","description":null,"fork":false,"url":"https://api.github.com/repos/clembou/github-requests","forks_url":"https://api.github.com/repos/clembou/github-requests/forks","keys_url":"https://api.github.com/repos/clembou/github-requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clembou/github-requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clembou/github-requests/teams","hooks_url":"https://api.github.com/repos/clembou/github-requests/hooks","issue_events_url":"https://api.github.com/repos/clembou/github-requests/issues/events{/number}","events_url":"https://api.github.com/repos/clembou/github-requests/events","assignees_url":"https://api.github.com/repos/clembou/github-requests/assignees{/user}","branches_url":"https://api.github.com/repos/clembou/github-requests/branches{/branch}","tags_url":"https://api.github.com/repos/clembou/github-requests/tags","blobs_url":"https://api.github.com/repos/clembou/github-requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clembou/github-requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clembou/github-requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/clembou/github-requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clembou/github-requests/statuses/{sha}","languages_url":"https://api.github.com/repos/clembou/github-requests/languages","stargazers_url":"https://api.github.com/repos/clembou/github-requests/stargazers","contributors_url":"https://api.github.com/repos/clembou/github-requests/contributors","subscribers_url":"https://api.github.com/repos/clembou/github-requests/subscribers","subscription_url":"https://api.github.com/repos/clembou/github-requests/subscription","commits_url":"https://api.github.com/repos/clembou/github-requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/clembou/github-requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/clembou/github-requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/clembou/github-requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/clembou/github-requests/contents/{+path}","compare_url":"https://api.github.com/repos/clembou/github-requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clembou/github-requests/merges","archive_url":"https://api.github.com/repos/clembou/github-requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clembou/github-requests/downloads","issues_url":"https://api.github.com/repos/clembou/github-requests/issues{/number}","pulls_url":"https://api.github.com/repos/clembou/github-requests/pulls{/number}","milestones_url":"https://api.github.com/repos/clembou/github-requests/milestones{/number}","notifications_url":"https://api.github.com/repos/clembou/github-requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clembou/github-requests/labels{/name}","releases_url":"https://api.github.com/repos/clembou/github-requests/releases{/id}","deployments_url":"https://api.github.com/repos/clembou/github-requests/deployments","created_at":"2016-10-29T12:23:21Z","updated_at":"2017-02-09T14:07:22Z","pushed_at":"2017-09-06T09:02:31Z","git_url":"git://github.com/clembou/github-requests.git","ssh_url":"git@github.com:clembou/github-requests.git","clone_url":"https://github.com/clembou/github-requests.git","svn_url":"https://github.com/clembou/github-requests","homepage":null,"size":415,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clembou/github-requests/pulls/37"},"html":{"href":"https://github.com/clembou/github-requests/pull/37"},"issue":{"href":"https://api.github.com/repos/clembou/github-requests/issues/37"},"comments":{"href":"https://api.github.com/repos/clembou/github-requests/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/clembou/github-requests/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/clembou/github-requests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clembou/github-requests/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/clembou/github-requests/statuses/3036586a3d74b428ba6e1cae3e16cfa980679346"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":81,"additions":952,"deletions":636,"changed_files":41}}
{"actor":{"display_login":"ceddlyburge"}}