{"action":"created","comment":{"url":"https://api.github.com/repos/decred/politeia/pulls/comments/235810052","pull_request_review_id":177388563,"id":235810052,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTgxMDA1Mg==","diff_hunk":"@@ -37,6 +37,7 @@ const (\n \tRouteLogin                  = \"/login\"\n \tRouteLogout                 = \"/logout\"\n \tRouteSecret                 = \"/secret\"\n+\tRouteUserProposalAccessTime = \"/user/proposals/{token:[A-z0-9]{64}}/accesstime\"","path":"politeiawww/api/v1/v1.go","position":4,"original_position":4,"commit_id":"fd84b12049823ee571777887e94bf582e682a44c","original_commit_id":"fd84b12049823ee571777887e94bf582e682a44c","user":{"login":"lukebp","id":9039877,"node_id":"MDQ6VXNlcjkwMzk4Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/9039877?v=4","gravatar_id":"","url":"https://api.github.com/users/lukebp","html_url":"https://github.com/lukebp","followers_url":"https://api.github.com/users/lukebp/followers","following_url":"https://api.github.com/users/lukebp/following{/other_user}","gists_url":"https://api.github.com/users/lukebp/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebp/subscriptions","organizations_url":"https://api.github.com/users/lukebp/orgs","repos_url":"https://api.github.com/users/lukebp/repos","events_url":"https://api.github.com/users/lukebp/events{/privacy}","received_events_url":"https://api.github.com/users/lukebp/received_events","type":"User","site_admin":false},"body":"`/user/proposals` refers to the proposals that have been submitted by the user, so having `accesstime` as a sub-route of the user's proposal collection was a bit confusing since you're using it to get the access times of all proposals, not just the user's proposals.  \r\n\r\nAnother thing that I found confusing is that you use this route as a GET request to return proposal access times for all proposals, but the route includes a specific proposal resource in the path.\r\n\r\nYou're also using a `POST` request, but the call is idempotent.  I would use a `PUT` request.\r\n\r\nThe way that I would do it would be to have the endpoints:\r\n`GET /user/accesstimes`\r\n`PUT /user/accesstimes/{token}`\r\n\r\nThe `GET` request is used to fetch the accesstimes for all vetted proposals and the `PUT` request is used to update the access time for a specific proposal.","created_at":"2018-11-22T19:48:09Z","updated_at":"2018-11-22T19:58:58Z","html_url":"https://github.com/decred/politeia/pull/606#discussion_r235810052","pull_request_url":"https://api.github.com/repos/decred/politeia/pulls/606","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/decred/politeia/pulls/comments/235810052"},"html":{"href":"https://github.com/decred/politeia/pull/606#discussion_r235810052"},"pull_request":{"href":"https://api.github.com/repos/decred/politeia/pulls/606"}}},"pull_request":{"url":"https://api.github.com/repos/decred/politeia/pulls/606","id":231764470,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzY0NDcw","html_url":"https://github.com/decred/politeia/pull/606","diff_url":"https://github.com/decred/politeia/pull/606.diff","patch_url":"https://github.com/decred/politeia/pull/606.patch","issue_url":"https://api.github.com/repos/decred/politeia/issues/606","number":606,"state":"open","locked":false,"title":"Proposal access time","user":{"login":"victorgcramos","id":22639213,"node_id":"MDQ6VXNlcjIyNjM5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/22639213?v=4","gravatar_id":"","url":"https://api.github.com/users/victorgcramos","html_url":"https://github.com/victorgcramos","followers_url":"https://api.github.com/users/victorgcramos/followers","following_url":"https://api.github.com/users/victorgcramos/following{/other_user}","gists_url":"https://api.github.com/users/victorgcramos/gists{/gist_id}","starred_url":"https://api.github.com/users/victorgcramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorgcramos/subscriptions","organizations_url":"https://api.github.com/users/victorgcramos/orgs","repos_url":"https://api.github.com/users/victorgcramos/repos","events_url":"https://api.github.com/users/victorgcramos/events{/privacy}","received_events_url":"https://api.github.com/users/victorgcramos/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-18T02:37:00Z","updated_at":"2018-11-22T19:58:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5abcebe31412ec1eb92baffebe7f6dbd0f836e3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/decred/politeia/pulls/606/commits","review_comments_url":"https://api.github.com/repos/decred/politeia/pulls/606/comments","review_comment_url":"https://api.github.com/repos/decred/politeia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/decred/politeia/issues/606/comments","statuses_url":"https://api.github.com/repos/decred/politeia/statuses/fd84b12049823ee571777887e94bf582e682a44c","head":{"label":"victorgcramos:proposal-access-time","ref":"proposal-access-time","sha":"fd84b12049823ee571777887e94bf582e682a44c","user":{"login":"victorgcramos","id":22639213,"node_id":"MDQ6VXNlcjIyNjM5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/22639213?v=4","gravatar_id":"","url":"https://api.github.com/users/victorgcramos","html_url":"https://github.com/victorgcramos","followers_url":"https://api.github.com/users/victorgcramos/followers","following_url":"https://api.github.com/users/victorgcramos/following{/other_user}","gists_url":"https://api.github.com/users/victorgcramos/gists{/gist_id}","starred_url":"https://api.github.com/users/victorgcramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorgcramos/subscriptions","organizations_url":"https://api.github.com/users/victorgcramos/orgs","repos_url":"https://api.github.com/users/victorgcramos/repos","events_url":"https://api.github.com/users/victorgcramos/events{/privacy}","received_events_url":"https://api.github.com/users/victorgcramos/received_events","type":"User","site_admin":false},"repo":{"id":153503713,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM1MDM3MTM=","name":"politeia","full_name":"victorgcramos/politeia","private":false,"owner":{"login":"victorgcramos","id":22639213,"node_id":"MDQ6VXNlcjIyNjM5MjEz","avatar_url":"https://avatars3.githubusercontent.com/u/22639213?v=4","gravatar_id":"","url":"https://api.github.com/users/victorgcramos","html_url":"https://github.com/victorgcramos","followers_url":"https://api.github.com/users/victorgcramos/followers","following_url":"https://api.github.com/users/victorgcramos/following{/other_user}","gists_url":"https://api.github.com/users/victorgcramos/gists{/gist_id}","starred_url":"https://api.github.com/users/victorgcramos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorgcramos/subscriptions","organizations_url":"https://api.github.com/users/victorgcramos/orgs","repos_url":"https://api.github.com/users/victorgcramos/repos","events_url":"https://api.github.com/users/victorgcramos/events{/privacy}","received_events_url":"https://api.github.com/users/victorgcramos/received_events","type":"User","site_admin":false},"html_url":"https://github.com/victorgcramos/politeia","description":null,"fork":true,"url":"https://api.github.com/repos/victorgcramos/politeia","forks_url":"https://api.github.com/repos/victorgcramos/politeia/forks","keys_url":"https://api.github.com/repos/victorgcramos/politeia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/victorgcramos/politeia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/victorgcramos/politeia/teams","hooks_url":"https://api.github.com/repos/victorgcramos/politeia/hooks","issue_events_url":"https://api.github.com/repos/victorgcramos/politeia/issues/events{/number}","events_url":"https://api.github.com/repos/victorgcramos/politeia/events","assignees_url":"https://api.github.com/repos/victorgcramos/politeia/assignees{/user}","branches_url":"https://api.github.com/repos/victorgcramos/politeia/branches{/branch}","tags_url":"https://api.github.com/repos/victorgcramos/politeia/tags","blobs_url":"https://api.github.com/repos/victorgcramos/politeia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/victorgcramos/politeia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/victorgcramos/politeia/git/refs{/sha}","trees_url":"https://api.github.com/repos/victorgcramos/politeia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/victorgcramos/politeia/statuses/{sha}","languages_url":"https://api.github.com/repos/victorgcramos/politeia/languages","stargazers_url":"https://api.github.com/repos/victorgcramos/politeia/stargazers","contributors_url":"https://api.github.com/repos/victorgcramos/politeia/contributors","subscribers_url":"https://api.github.com/repos/victorgcramos/politeia/subscribers","subscription_url":"https://api.github.com/repos/victorgcramos/politeia/subscription","commits_url":"https://api.github.com/repos/victorgcramos/politeia/commits{/sha}","git_commits_url":"https://api.github.com/repos/victorgcramos/politeia/git/commits{/sha}","comments_url":"https://api.github.com/repos/victorgcramos/politeia/comments{/number}","issue_comment_url":"https://api.github.com/repos/victorgcramos/politeia/issues/comments{/number}","contents_url":"https://api.github.com/repos/victorgcramos/politeia/contents/{+path}","compare_url":"https://api.github.com/repos/victorgcramos/politeia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/victorgcramos/politeia/merges","archive_url":"https://api.github.com/repos/victorgcramos/politeia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/victorgcramos/politeia/downloads","issues_url":"https://api.github.com/repos/victorgcramos/politeia/issues{/number}","pulls_url":"https://api.github.com/repos/victorgcramos/politeia/pulls{/number}","milestones_url":"https://api.github.com/repos/victorgcramos/politeia/milestones{/number}","notifications_url":"https://api.github.com/repos/victorgcramos/politeia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/victorgcramos/politeia/labels{/name}","releases_url":"https://api.github.com/repos/victorgcramos/politeia/releases{/id}","deployments_url":"https://api.github.com/repos/victorgcramos/politeia/deployments","created_at":"2018-10-17T18:19:52Z","updated_at":"2018-10-17T18:19:54Z","pushed_at":"2018-11-21T18:05:11Z","git_url":"git://github.com/victorgcramos/politeia.git","ssh_url":"git@github.com:victorgcramos/politeia.git","clone_url":"https://github.com/victorgcramos/politeia.git","svn_url":"https://github.com/victorgcramos/politeia","homepage":null,"size":1649,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"decred:master","ref":"master","sha":"cc17ab6f49795e3b3035b439df74f2db6fc49079","user":{"login":"decred","id":16297194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjk3MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/16297194?v=4","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"repo":{"id":101333624,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzMzM2MjQ=","name":"politeia","full_name":"decred/politeia","private":false,"owner":{"login":"decred","id":16297194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjk3MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/16297194?v=4","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/decred/politeia","description":null,"fork":false,"url":"https://api.github.com/repos/decred/politeia","forks_url":"https://api.github.com/repos/decred/politeia/forks","keys_url":"https://api.github.com/repos/decred/politeia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/decred/politeia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/decred/politeia/teams","hooks_url":"https://api.github.com/repos/decred/politeia/hooks","issue_events_url":"https://api.github.com/repos/decred/politeia/issues/events{/number}","events_url":"https://api.github.com/repos/decred/politeia/events","assignees_url":"https://api.github.com/repos/decred/politeia/assignees{/user}","branches_url":"https://api.github.com/repos/decred/politeia/branches{/branch}","tags_url":"https://api.github.com/repos/decred/politeia/tags","blobs_url":"https://api.github.com/repos/decred/politeia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/decred/politeia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/decred/politeia/git/refs{/sha}","trees_url":"https://api.github.com/repos/decred/politeia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/decred/politeia/statuses/{sha}","languages_url":"https://api.github.com/repos/decred/politeia/languages","stargazers_url":"https://api.github.com/repos/decred/politeia/stargazers","contributors_url":"https://api.github.com/repos/decred/politeia/contributors","subscribers_url":"https://api.github.com/repos/decred/politeia/subscribers","subscription_url":"https://api.github.com/repos/decred/politeia/subscription","commits_url":"https://api.github.com/repos/decred/politeia/commits{/sha}","git_commits_url":"https://api.github.com/repos/decred/politeia/git/commits{/sha}","comments_url":"https://api.github.com/repos/decred/politeia/comments{/number}","issue_comment_url":"https://api.github.com/repos/decred/politeia/issues/comments{/number}","contents_url":"https://api.github.com/repos/decred/politeia/contents/{+path}","compare_url":"https://api.github.com/repos/decred/politeia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/decred/politeia/merges","archive_url":"https://api.github.com/repos/decred/politeia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/decred/politeia/downloads","issues_url":"https://api.github.com/repos/decred/politeia/issues{/number}","pulls_url":"https://api.github.com/repos/decred/politeia/pulls{/number}","milestones_url":"https://api.github.com/repos/decred/politeia/milestones{/number}","notifications_url":"https://api.github.com/repos/decred/politeia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/decred/politeia/labels{/name}","releases_url":"https://api.github.com/repos/decred/politeia/releases{/id}","deployments_url":"https://api.github.com/repos/decred/politeia/deployments","created_at":"2017-08-24T20:07:43Z","updated_at":"2018-11-19T18:18:52Z","pushed_at":"2018-11-22T14:51:55Z","git_url":"git://github.com/decred/politeia.git","ssh_url":"git@github.com:decred/politeia.git","clone_url":"https://github.com/decred/politeia.git","svn_url":"https://github.com/decred/politeia","homepage":null,"size":1608,"stargazers_count":76,"watchers_count":76,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":54,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":43,"open_issues":54,"watchers":76,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/decred/politeia/pulls/606"},"html":{"href":"https://github.com/decred/politeia/pull/606"},"issue":{"href":"https://api.github.com/repos/decred/politeia/issues/606"},"comments":{"href":"https://api.github.com/repos/decred/politeia/issues/606/comments"},"review_comments":{"href":"https://api.github.com/repos/decred/politeia/pulls/606/comments"},"review_comment":{"href":"https://api.github.com/repos/decred/politeia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/decred/politeia/pulls/606/commits"},"statuses":{"href":"https://api.github.com/repos/decred/politeia/statuses/fd84b12049823ee571777887e94bf582e682a44c"}},"author_association":"NONE"}}
{"actor":{"display_login":"lukebp"}}