{"action":"created","comment":{"url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments/207667413","pull_request_review_id":143334601,"id":207667413,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzY2NzQxMw==","diff_hunk":"@@ -1,49 +1,58 @@\n+{-# LANGUAGE TypeOperators #-}\n+\n -- | Functions to serve Student HTTP API\n \n module Dscp.Educator.Web.Server\n        ( serveStudentAPIReal\n-       , convertStudentApiHandler\n        ) where\n \n import Fmt ((+|), (|+))\n import Loot.Log (logInfo)\n-import Servant (Handler, Server, hoistServer, serve, throwError)\n+import Servant ((:<|>) (..), (:>), Handler, Server, hoistServer, serve)\n import Servant.Generic (toServant)\n \n import Dscp.Educator.Config (HasEducatorConfig)\n-import Dscp.Educator.Launcher (EducatorContext, EducatorRealMode, EducatorWorkMode)\n-import Dscp.Educator.Web.Bot.Handlers (addBotHandlers)\n+import Dscp.Educator.Launcher (EducatorRealMode, EducatorWorkMode)\n+import Dscp.Educator.Web.Bot (addBotHandlers)\n+import Dscp.Educator.Web.Educator (EducatorAPI, convertEducatorApiHandler, educatorAPI,\n+                                   educatorApiHandlers)\n import Dscp.Educator.Web.Params (EducatorWebParams (..))\n-import Dscp.Educator.Web.Student.API (StudentAPI, studentAPI)\n-import Dscp.Educator.Web.Student.Error (toServantErr, unexpectedToServantErr)\n-import Dscp.Educator.Web.Student.Handlers (studentApiHandlers)\n-import Dscp.Launcher.Rio (runRIO)\n+import Dscp.Educator.Web.Student (StudentAPI, convertStudentApiHandler, studentAPI,\n+                                  studentApiHandlers)\n import Dscp.Web (ServerParams (..), serveWeb)\n \n-studentAPIServer\n+type EducatorWebAPI = \"api\" :> (\n+    \"educator\" :> EducatorAPI\n+    :<|>\n+    \"student\" :> StudentAPI\n+  )\n+\n+mkEducatorApiServer\n+    :: forall ctx m. EducatorWorkMode ctx m\n+    => (forall x. m x -> Handler x)\n+    -> Server EducatorAPI\n+mkEducatorApiServer nat =\n+    hoistServer educatorAPI nat (toServant educatorApiHandlers)\n+\n+mkStudentApiServer\n     :: forall ctx m. EducatorWorkMode ctx m\n     => (forall x. m x -> Handler x)\n     -> Bool\n     -> m (Server StudentAPI)\n-studentAPIServer nat withBot = do\n-    handlers <-\n+mkStudentApiServer nat withBot = do\n+    studentAndBotHandlers <-\n         bool identity (>>= addBotHandlers) withBot\n         (pure studentApiHandlers)","path":"educator/src/Dscp/Educator/Web/Server.hs","position":56,"original_position":56,"commit_id":"e9bcc30b7d4d88a759469610f1ec3f549d675f75","original_commit_id":"e9bcc30b7d4d88a759469610f1ec3f549d675f75","user":{"login":"Martoon-00","id":5394217,"node_id":"MDQ6VXNlcjUzOTQyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/5394217?v=4","gravatar_id":"","url":"https://api.github.com/users/Martoon-00","html_url":"https://github.com/Martoon-00","followers_url":"https://api.github.com/users/Martoon-00/followers","following_url":"https://api.github.com/users/Martoon-00/following{/other_user}","gists_url":"https://api.github.com/users/Martoon-00/gists{/gist_id}","starred_url":"https://api.github.com/users/Martoon-00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martoon-00/subscriptions","organizations_url":"https://api.github.com/users/Martoon-00/orgs","repos_url":"https://api.github.com/users/Martoon-00/repos","events_url":"https://api.github.com/users/Martoon-00/events{/privacy}","received_events_url":"https://api.github.com/users/Martoon-00/received_events","type":"User","site_admin":false},"body":"I wanted it to look like a pipeline so that it was easy to build handlers from many pieces, one piece per line","created_at":"2018-08-03T21:05:07Z","updated_at":"2018-08-03T21:05:07Z","html_url":"https://github.com/DisciplinaOU/disciplina/pull/87#discussion_r207667413","pull_request_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments/207667413"},"html":{"href":"https://github.com/DisciplinaOU/disciplina/pull/87#discussion_r207667413"},"pull_request":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87"}},"in_reply_to_id":207657277},"pull_request":{"url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87","id":206095777,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MDk1Nzc3","html_url":"https://github.com/DisciplinaOU/disciplina/pull/87","diff_url":"https://github.com/DisciplinaOU/disciplina/pull/87.diff","patch_url":"https://github.com/DisciplinaOU/disciplina/pull/87.patch","issue_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/87","number":87,"state":"open","locked":false,"title":"[DSCP-113] Educator api server with stubs","user":{"login":"Martoon-00","id":5394217,"node_id":"MDQ6VXNlcjUzOTQyMTc=","avatar_url":"https://avatars3.githubusercontent.com/u/5394217?v=4","gravatar_id":"","url":"https://api.github.com/users/Martoon-00","html_url":"https://github.com/Martoon-00","followers_url":"https://api.github.com/users/Martoon-00/followers","following_url":"https://api.github.com/users/Martoon-00/following{/other_user}","gists_url":"https://api.github.com/users/Martoon-00/gists{/gist_id}","starred_url":"https://api.github.com/users/Martoon-00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martoon-00/subscriptions","organizations_url":"https://api.github.com/users/Martoon-00/orgs","repos_url":"https://api.github.com/users/Martoon-00/repos","events_url":"https://api.github.com/users/Martoon-00/events{/privacy}","received_events_url":"https://api.github.com/users/Martoon-00/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-03T17:42:58Z","updated_at":"2018-08-03T21:05:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed1105d2e9cbc3a004176da5cd6e2780854cd2bc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"volhovm","id":5604643,"node_id":"MDQ6VXNlcjU2MDQ2NDM=","avatar_url":"https://avatars0.githubusercontent.com/u/5604643?v=4","gravatar_id":"","url":"https://api.github.com/users/volhovm","html_url":"https://github.com/volhovm","followers_url":"https://api.github.com/users/volhovm/followers","following_url":"https://api.github.com/users/volhovm/following{/other_user}","gists_url":"https://api.github.com/users/volhovm/gists{/gist_id}","starred_url":"https://api.github.com/users/volhovm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volhovm/subscriptions","organizations_url":"https://api.github.com/users/volhovm/orgs","repos_url":"https://api.github.com/users/volhovm/repos","events_url":"https://api.github.com/users/volhovm/events{/privacy}","received_events_url":"https://api.github.com/users/volhovm/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87/commits","review_comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87/comments","review_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/87/comments","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/e9bcc30b7d4d88a759469610f1ec3f549d675f75","head":{"label":"DisciplinaOU:martoon/dscp113-educator-api-stubs","ref":"martoon/dscp113-educator-api-stubs","sha":"e9bcc30b7d4d88a759469610f1ec3f549d675f75","user":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"repo":{"id":113064771,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMwNjQ3NzE=","name":"disciplina","full_name":"DisciplinaOU/disciplina","owner":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DisciplinaOU/disciplina","description":"We are developing the first blockchain for recruiting & education","fork":false,"url":"https://api.github.com/repos/DisciplinaOU/disciplina","forks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/forks","keys_url":"https://api.github.com/repos/DisciplinaOU/disciplina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DisciplinaOU/disciplina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DisciplinaOU/disciplina/teams","hooks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/hooks","issue_events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/events{/number}","events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/events","assignees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/assignees{/user}","branches_url":"https://api.github.com/repos/DisciplinaOU/disciplina/branches{/branch}","tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/tags","blobs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/refs{/sha}","trees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/{sha}","languages_url":"https://api.github.com/repos/DisciplinaOU/disciplina/languages","stargazers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/stargazers","contributors_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contributors","subscribers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscribers","subscription_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscription","commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/commits{/sha}","git_commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/commits{/sha}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/comments{/number}","issue_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/comments{/number}","contents_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contents/{+path}","compare_url":"https://api.github.com/repos/DisciplinaOU/disciplina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DisciplinaOU/disciplina/merges","archive_url":"https://api.github.com/repos/DisciplinaOU/disciplina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DisciplinaOU/disciplina/downloads","issues_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues{/number}","pulls_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls{/number}","milestones_url":"https://api.github.com/repos/DisciplinaOU/disciplina/milestones{/number}","notifications_url":"https://api.github.com/repos/DisciplinaOU/disciplina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DisciplinaOU/disciplina/labels{/name}","releases_url":"https://api.github.com/repos/DisciplinaOU/disciplina/releases{/id}","deployments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/deployments","created_at":"2017-12-04T16:10:46Z","updated_at":"2018-08-03T18:41:47Z","pushed_at":"2018-08-03T19:57:18Z","git_url":"git://github.com/DisciplinaOU/disciplina.git","ssh_url":"git@github.com:DisciplinaOU/disciplina.git","clone_url":"https://github.com/DisciplinaOU/disciplina.git","svn_url":"https://github.com/DisciplinaOU/disciplina","homepage":"https://disciplina.io","size":5120,"stargazers_count":20,"watchers_count":20,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":20,"default_branch":"master"}},"base":{"label":"DisciplinaOU:master","ref":"master","sha":"8d9dd616295d1a860c6a4ef87da254debdfea69a","user":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"repo":{"id":113064771,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMwNjQ3NzE=","name":"disciplina","full_name":"DisciplinaOU/disciplina","owner":{"login":"DisciplinaOU","id":38657648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4NjU3NjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/38657648?v=4","gravatar_id":"","url":"https://api.github.com/users/DisciplinaOU","html_url":"https://github.com/DisciplinaOU","followers_url":"https://api.github.com/users/DisciplinaOU/followers","following_url":"https://api.github.com/users/DisciplinaOU/following{/other_user}","gists_url":"https://api.github.com/users/DisciplinaOU/gists{/gist_id}","starred_url":"https://api.github.com/users/DisciplinaOU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DisciplinaOU/subscriptions","organizations_url":"https://api.github.com/users/DisciplinaOU/orgs","repos_url":"https://api.github.com/users/DisciplinaOU/repos","events_url":"https://api.github.com/users/DisciplinaOU/events{/privacy}","received_events_url":"https://api.github.com/users/DisciplinaOU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DisciplinaOU/disciplina","description":"We are developing the first blockchain for recruiting & education","fork":false,"url":"https://api.github.com/repos/DisciplinaOU/disciplina","forks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/forks","keys_url":"https://api.github.com/repos/DisciplinaOU/disciplina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DisciplinaOU/disciplina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DisciplinaOU/disciplina/teams","hooks_url":"https://api.github.com/repos/DisciplinaOU/disciplina/hooks","issue_events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/events{/number}","events_url":"https://api.github.com/repos/DisciplinaOU/disciplina/events","assignees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/assignees{/user}","branches_url":"https://api.github.com/repos/DisciplinaOU/disciplina/branches{/branch}","tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/tags","blobs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/refs{/sha}","trees_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/{sha}","languages_url":"https://api.github.com/repos/DisciplinaOU/disciplina/languages","stargazers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/stargazers","contributors_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contributors","subscribers_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscribers","subscription_url":"https://api.github.com/repos/DisciplinaOU/disciplina/subscription","commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/commits{/sha}","git_commits_url":"https://api.github.com/repos/DisciplinaOU/disciplina/git/commits{/sha}","comments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/comments{/number}","issue_comment_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/comments{/number}","contents_url":"https://api.github.com/repos/DisciplinaOU/disciplina/contents/{+path}","compare_url":"https://api.github.com/repos/DisciplinaOU/disciplina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DisciplinaOU/disciplina/merges","archive_url":"https://api.github.com/repos/DisciplinaOU/disciplina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DisciplinaOU/disciplina/downloads","issues_url":"https://api.github.com/repos/DisciplinaOU/disciplina/issues{/number}","pulls_url":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls{/number}","milestones_url":"https://api.github.com/repos/DisciplinaOU/disciplina/milestones{/number}","notifications_url":"https://api.github.com/repos/DisciplinaOU/disciplina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DisciplinaOU/disciplina/labels{/name}","releases_url":"https://api.github.com/repos/DisciplinaOU/disciplina/releases{/id}","deployments_url":"https://api.github.com/repos/DisciplinaOU/disciplina/deployments","created_at":"2017-12-04T16:10:46Z","updated_at":"2018-08-03T18:41:47Z","pushed_at":"2018-08-03T19:57:18Z","git_url":"git://github.com/DisciplinaOU/disciplina.git","ssh_url":"git@github.com:DisciplinaOU/disciplina.git","clone_url":"https://github.com/DisciplinaOU/disciplina.git","svn_url":"https://github.com/DisciplinaOU/disciplina","homepage":"https://disciplina.io","size":5120,"stargazers_count":20,"watchers_count":20,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87"},"html":{"href":"https://github.com/DisciplinaOU/disciplina/pull/87"},"issue":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/87"},"comments":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/DisciplinaOU/disciplina/statuses/e9bcc30b7d4d88a759469610f1ec3f549d675f75"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Martoon-00"}}