{"action":"created","comment":{"url":"https://api.github.com/repos/solnsumei/hello-books/pulls/comments/154491974","pull_request_review_id":80671159,"id":154491974,"diff_hunk":"@@ -0,0 +1,91 @@\n+import express from 'express';\n+import usersController from '../controllers/users';\n+import categoriesController from '../controllers/categories';\n+import booksController from '../controllers/books';\n+import membershipController from '../controllers/membership';\n+import passwordController from '../controllers/password';\n+import authMiddleware from '../middlewares/auth';\n+import validateResetToken from '../middlewares/validateResetToken';\n+import validateCategory from '../middlewares/validateCategory';\n+import notificationsController from '../controllers/notifications';\n+import validateBook from '../middlewares/validateBook';\n+import borrowAccess from '../middlewares/borrowAccess';\n+import formValidation from '../middlewares/formValidation';\n+import requestType from '../helpers/requestTypes';\n+import failedRoutes from '../middlewares/failedRoutes';\n+import adminMiddleware from '../middlewares/admin';\n+\n+const router = express.Router();\n+\n+router.post('/users/signup', formValidation(requestType.SIGNUP), usersController.create);\n+\n+router.post('/users/signin', formValidation(requestType.LOGIN), usersController.login);\n+\n+// reset password routes\n+router.post('/users/forgot-password', passwordController.forgotPassword);\n+router.post('/users/reset-password', formValidation(requestType.RESET_PASSWORD), validateResetToken, passwordController.resetPassword);\n+\n+// Authentication middle to check for logged in user\n+\n+router.get('/user/profile', authMiddleware, usersController.getUser);\n+\n+router.put('/user/profile', authMiddleware,\n+  formValidation(requestType.UPDATE_PROFILE), usersController.updateProfile);\n+\n+router.post('/user/change-password', authMiddleware,\n+  formValidation(requestType.CHANGE_PASSWORD), usersController.changePassword);\n+\n+router.get('/books/:bookId', authMiddleware, booksController.getBook);\n+\n+router.get('/books', authMiddleware, booksController.getAllBooks);\n+\n+router.post('/book/borrow', authMiddleware,\n+  borrowAccess, validateBook, usersController.borrowBook);\n+\n+router.put('/book/return', authMiddleware, validateBook,\n+  usersController.returnBook);\n+\n+router.get('/user/history', authMiddleware, usersController.borrowHistory);\n+\n+router.get('/notifications/:notificationId', authMiddleware,\n+  adminMiddleware, notificationsController.getNotification);\n+\n+router.get('/notifications', authMiddleware, adminMiddleware,\n+  notificationsController.getAllUnreadNotifications);\n+\n+router.get('/membership', authMiddleware, adminMiddleware,\n+  membershipController.getAllMemberShipTypes);\n+\n+router.put('/membership/:membershipId', authMiddleware, adminMiddleware,\n+  formValidation(requestType.EDIT_MEMBERSHIP_TYPE), membershipController.update);\n+\n+router.post('/categories', authMiddleware, adminMiddleware,\n+  formValidation(requestType.ADD_CATEGORY), categoriesController.create);\n+\n+router.put('/categories/:categoryId', authMiddleware, adminMiddleware,\n+  formValidation(requestType.EDIT_CATEGORY), validateCategory, categoriesController.update);\n+\n+router.delete('/categories/:categoryId', authMiddleware, adminMiddleware,\n+  validateCategory, categoriesController.delete);","path":"server/routes/index.js","position":69,"original_position":69,"commit_id":"9a2c8a4ba01f52809b85f46022159a5d48b683b6","original_commit_id":"9a2c8a4ba01f52809b85f46022159a5d48b683b6","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Expected a newline before ')'                                         function-paren-newline","created_at":"2017-12-02T09:11:08Z","updated_at":"2017-12-02T09:11:09Z","html_url":"https://github.com/solnsumei/hello-books/pull/43#discussion_r154491974","pull_request_url":"https://api.github.com/repos/solnsumei/hello-books/pulls/43","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/comments/154491974"},"html":{"href":"https://github.com/solnsumei/hello-books/pull/43#discussion_r154491974"},"pull_request":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/solnsumei/hello-books/pulls/43","id":148084149,"html_url":"https://github.com/solnsumei/hello-books/pull/43","diff_url":"https://github.com/solnsumei/hello-books/pull/43.diff","patch_url":"https://github.com/solnsumei/hello-books/pull/43.patch","issue_url":"https://api.github.com/repos/solnsumei/hello-books/issues/43","number":43,"state":"open","locked":false,"title":"Project State","user":{"login":"solnsumei","id":7557099,"avatar_url":"https://avatars3.githubusercontent.com/u/7557099?v=4","gravatar_id":"","url":"https://api.github.com/users/solnsumei","html_url":"https://github.com/solnsumei","followers_url":"https://api.github.com/users/solnsumei/followers","following_url":"https://api.github.com/users/solnsumei/following{/other_user}","gists_url":"https://api.github.com/users/solnsumei/gists{/gist_id}","starred_url":"https://api.github.com/users/solnsumei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnsumei/subscriptions","organizations_url":"https://api.github.com/users/solnsumei/orgs","repos_url":"https://api.github.com/users/solnsumei/repos","events_url":"https://api.github.com/users/solnsumei/events{/privacy}","received_events_url":"https://api.github.com/users/solnsumei/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nThis PR shows the current state of the project\r\n### Description\r\n- Server side code base almost complete\r\n- Client side react components added\r\n- Server side test up to 80%\r\n- Client side functionality almost complete\r\n","created_at":"2017-10-23T09:46:52Z","updated_at":"2017-12-02T09:11:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b77001cdcb30324a6dce863a70d194f55354af7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/solnsumei/hello-books/pulls/43/commits","review_comments_url":"https://api.github.com/repos/solnsumei/hello-books/pulls/43/comments","review_comment_url":"https://api.github.com/repos/solnsumei/hello-books/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solnsumei/hello-books/issues/43/comments","statuses_url":"https://api.github.com/repos/solnsumei/hello-books/statuses/9a2c8a4ba01f52809b85f46022159a5d48b683b6","head":{"label":"solnsumei:development","ref":"development","sha":"9a2c8a4ba01f52809b85f46022159a5d48b683b6","user":{"login":"solnsumei","id":7557099,"avatar_url":"https://avatars3.githubusercontent.com/u/7557099?v=4","gravatar_id":"","url":"https://api.github.com/users/solnsumei","html_url":"https://github.com/solnsumei","followers_url":"https://api.github.com/users/solnsumei/followers","following_url":"https://api.github.com/users/solnsumei/following{/other_user}","gists_url":"https://api.github.com/users/solnsumei/gists{/gist_id}","starred_url":"https://api.github.com/users/solnsumei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnsumei/subscriptions","organizations_url":"https://api.github.com/users/solnsumei/orgs","repos_url":"https://api.github.com/users/solnsumei/repos","events_url":"https://api.github.com/users/solnsumei/events{/privacy}","received_events_url":"https://api.github.com/users/solnsumei/received_events","type":"User","site_admin":false},"repo":{"id":98537529,"name":"hello-books","full_name":"solnsumei/hello-books","owner":{"login":"solnsumei","id":7557099,"avatar_url":"https://avatars3.githubusercontent.com/u/7557099?v=4","gravatar_id":"","url":"https://api.github.com/users/solnsumei","html_url":"https://github.com/solnsumei","followers_url":"https://api.github.com/users/solnsumei/followers","following_url":"https://api.github.com/users/solnsumei/following{/other_user}","gists_url":"https://api.github.com/users/solnsumei/gists{/gist_id}","starred_url":"https://api.github.com/users/solnsumei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnsumei/subscriptions","organizations_url":"https://api.github.com/users/solnsumei/orgs","repos_url":"https://api.github.com/users/solnsumei/repos","events_url":"https://api.github.com/users/solnsumei/events{/privacy}","received_events_url":"https://api.github.com/users/solnsumei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/solnsumei/hello-books","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books.","fork":false,"url":"https://api.github.com/repos/solnsumei/hello-books","forks_url":"https://api.github.com/repos/solnsumei/hello-books/forks","keys_url":"https://api.github.com/repos/solnsumei/hello-books/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solnsumei/hello-books/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solnsumei/hello-books/teams","hooks_url":"https://api.github.com/repos/solnsumei/hello-books/hooks","issue_events_url":"https://api.github.com/repos/solnsumei/hello-books/issues/events{/number}","events_url":"https://api.github.com/repos/solnsumei/hello-books/events","assignees_url":"https://api.github.com/repos/solnsumei/hello-books/assignees{/user}","branches_url":"https://api.github.com/repos/solnsumei/hello-books/branches{/branch}","tags_url":"https://api.github.com/repos/solnsumei/hello-books/tags","blobs_url":"https://api.github.com/repos/solnsumei/hello-books/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solnsumei/hello-books/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solnsumei/hello-books/git/refs{/sha}","trees_url":"https://api.github.com/repos/solnsumei/hello-books/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solnsumei/hello-books/statuses/{sha}","languages_url":"https://api.github.com/repos/solnsumei/hello-books/languages","stargazers_url":"https://api.github.com/repos/solnsumei/hello-books/stargazers","contributors_url":"https://api.github.com/repos/solnsumei/hello-books/contributors","subscribers_url":"https://api.github.com/repos/solnsumei/hello-books/subscribers","subscription_url":"https://api.github.com/repos/solnsumei/hello-books/subscription","commits_url":"https://api.github.com/repos/solnsumei/hello-books/commits{/sha}","git_commits_url":"https://api.github.com/repos/solnsumei/hello-books/git/commits{/sha}","comments_url":"https://api.github.com/repos/solnsumei/hello-books/comments{/number}","issue_comment_url":"https://api.github.com/repos/solnsumei/hello-books/issues/comments{/number}","contents_url":"https://api.github.com/repos/solnsumei/hello-books/contents/{+path}","compare_url":"https://api.github.com/repos/solnsumei/hello-books/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solnsumei/hello-books/merges","archive_url":"https://api.github.com/repos/solnsumei/hello-books/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solnsumei/hello-books/downloads","issues_url":"https://api.github.com/repos/solnsumei/hello-books/issues{/number}","pulls_url":"https://api.github.com/repos/solnsumei/hello-books/pulls{/number}","milestones_url":"https://api.github.com/repos/solnsumei/hello-books/milestones{/number}","notifications_url":"https://api.github.com/repos/solnsumei/hello-books/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solnsumei/hello-books/labels{/name}","releases_url":"https://api.github.com/repos/solnsumei/hello-books/releases{/id}","deployments_url":"https://api.github.com/repos/solnsumei/hello-books/deployments","created_at":"2017-07-27T13:13:50Z","updated_at":"2017-10-09T09:19:14Z","pushed_at":"2017-12-02T09:10:07Z","git_url":"git://github.com/solnsumei/hello-books.git","ssh_url":"git@github.com:solnsumei/hello-books.git","clone_url":"https://github.com/solnsumei/hello-books.git","svn_url":"https://github.com/solnsumei/hello-books","homepage":null,"size":4997,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"base":{"label":"solnsumei:master","ref":"master","sha":"6539be9a2de3334b2d91fea3c836db85407e6376","user":{"login":"solnsumei","id":7557099,"avatar_url":"https://avatars3.githubusercontent.com/u/7557099?v=4","gravatar_id":"","url":"https://api.github.com/users/solnsumei","html_url":"https://github.com/solnsumei","followers_url":"https://api.github.com/users/solnsumei/followers","following_url":"https://api.github.com/users/solnsumei/following{/other_user}","gists_url":"https://api.github.com/users/solnsumei/gists{/gist_id}","starred_url":"https://api.github.com/users/solnsumei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnsumei/subscriptions","organizations_url":"https://api.github.com/users/solnsumei/orgs","repos_url":"https://api.github.com/users/solnsumei/repos","events_url":"https://api.github.com/users/solnsumei/events{/privacy}","received_events_url":"https://api.github.com/users/solnsumei/received_events","type":"User","site_admin":false},"repo":{"id":98537529,"name":"hello-books","full_name":"solnsumei/hello-books","owner":{"login":"solnsumei","id":7557099,"avatar_url":"https://avatars3.githubusercontent.com/u/7557099?v=4","gravatar_id":"","url":"https://api.github.com/users/solnsumei","html_url":"https://github.com/solnsumei","followers_url":"https://api.github.com/users/solnsumei/followers","following_url":"https://api.github.com/users/solnsumei/following{/other_user}","gists_url":"https://api.github.com/users/solnsumei/gists{/gist_id}","starred_url":"https://api.github.com/users/solnsumei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solnsumei/subscriptions","organizations_url":"https://api.github.com/users/solnsumei/orgs","repos_url":"https://api.github.com/users/solnsumei/repos","events_url":"https://api.github.com/users/solnsumei/events{/privacy}","received_events_url":"https://api.github.com/users/solnsumei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/solnsumei/hello-books","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books.","fork":false,"url":"https://api.github.com/repos/solnsumei/hello-books","forks_url":"https://api.github.com/repos/solnsumei/hello-books/forks","keys_url":"https://api.github.com/repos/solnsumei/hello-books/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solnsumei/hello-books/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solnsumei/hello-books/teams","hooks_url":"https://api.github.com/repos/solnsumei/hello-books/hooks","issue_events_url":"https://api.github.com/repos/solnsumei/hello-books/issues/events{/number}","events_url":"https://api.github.com/repos/solnsumei/hello-books/events","assignees_url":"https://api.github.com/repos/solnsumei/hello-books/assignees{/user}","branches_url":"https://api.github.com/repos/solnsumei/hello-books/branches{/branch}","tags_url":"https://api.github.com/repos/solnsumei/hello-books/tags","blobs_url":"https://api.github.com/repos/solnsumei/hello-books/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solnsumei/hello-books/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solnsumei/hello-books/git/refs{/sha}","trees_url":"https://api.github.com/repos/solnsumei/hello-books/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solnsumei/hello-books/statuses/{sha}","languages_url":"https://api.github.com/repos/solnsumei/hello-books/languages","stargazers_url":"https://api.github.com/repos/solnsumei/hello-books/stargazers","contributors_url":"https://api.github.com/repos/solnsumei/hello-books/contributors","subscribers_url":"https://api.github.com/repos/solnsumei/hello-books/subscribers","subscription_url":"https://api.github.com/repos/solnsumei/hello-books/subscription","commits_url":"https://api.github.com/repos/solnsumei/hello-books/commits{/sha}","git_commits_url":"https://api.github.com/repos/solnsumei/hello-books/git/commits{/sha}","comments_url":"https://api.github.com/repos/solnsumei/hello-books/comments{/number}","issue_comment_url":"https://api.github.com/repos/solnsumei/hello-books/issues/comments{/number}","contents_url":"https://api.github.com/repos/solnsumei/hello-books/contents/{+path}","compare_url":"https://api.github.com/repos/solnsumei/hello-books/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solnsumei/hello-books/merges","archive_url":"https://api.github.com/repos/solnsumei/hello-books/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solnsumei/hello-books/downloads","issues_url":"https://api.github.com/repos/solnsumei/hello-books/issues{/number}","pulls_url":"https://api.github.com/repos/solnsumei/hello-books/pulls{/number}","milestones_url":"https://api.github.com/repos/solnsumei/hello-books/milestones{/number}","notifications_url":"https://api.github.com/repos/solnsumei/hello-books/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solnsumei/hello-books/labels{/name}","releases_url":"https://api.github.com/repos/solnsumei/hello-books/releases{/id}","deployments_url":"https://api.github.com/repos/solnsumei/hello-books/deployments","created_at":"2017-07-27T13:13:50Z","updated_at":"2017-10-09T09:19:14Z","pushed_at":"2017-12-02T09:10:07Z","git_url":"git://github.com/solnsumei/hello-books.git","ssh_url":"git@github.com:solnsumei/hello-books.git","clone_url":"https://github.com/solnsumei/hello-books.git","svn_url":"https://github.com/solnsumei/hello-books","homepage":null,"size":4997,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/43"},"html":{"href":"https://github.com/solnsumei/hello-books/pull/43"},"issue":{"href":"https://api.github.com/repos/solnsumei/hello-books/issues/43"},"comments":{"href":"https://api.github.com/repos/solnsumei/hello-books/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solnsumei/hello-books/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/solnsumei/hello-books/statuses/9a2c8a4ba01f52809b85f46022159a5d48b683b6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}