{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/comments/203719813","pull_request_review_id":138663410,"id":203719813,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzcxOTgxMw==","diff_hunk":"@@ -24,9 +24,12 @@ class App < Sinatra::Base\n           siteIP: params.fetch(:site_ip_address),\n           building_identifier: params.fetch(:called_station_id),\n         )\n+\n         user = User.find(username: params.fetch(:username))\n-        user.last_login = Time.now.strftime('%y-%m-%d %H:%M:%S')\n-        user.save\n+        if user\n+          user.last_login = Time.now.strftime('%y-%m-%d %H:%M:%S')\n+          user.save\n+        end","path":"app.rb","position":20,"original_position":20,"commit_id":"1f24a63b1959e2975c604089ae5c28be92ae5cc3","original_commit_id":"1f24a63b1959e2975c604089ae5c28be92ae5cc3","user":{"login":"emileswarts","id":1215147,"node_id":"MDQ6VXNlcjEyMTUxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1215147?v=4","gravatar_id":"","url":"https://api.github.com/users/emileswarts","html_url":"https://github.com/emileswarts","followers_url":"https://api.github.com/users/emileswarts/followers","following_url":"https://api.github.com/users/emileswarts/following{/other_user}","gists_url":"https://api.github.com/users/emileswarts/gists{/gist_id}","starred_url":"https://api.github.com/users/emileswarts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emileswarts/subscriptions","organizations_url":"https://api.github.com/users/emileswarts/orgs","repos_url":"https://api.github.com/users/emileswarts/repos","events_url":"https://api.github.com/users/emileswarts/events{/privacy}","received_events_url":"https://api.github.com/users/emileswarts/received_events","type":"User","site_admin":false},"body":"Yeah could be.  I have yet to refactor this code out of app.rb","created_at":"2018-07-19T13:12:00Z","updated_at":"2018-07-19T13:12:00Z","html_url":"https://github.com/alphagov/govwifi-logging-api/pull/9#discussion_r203719813","pull_request_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/comments/203719813"},"html":{"href":"https://github.com/alphagov/govwifi-logging-api/pull/9#discussion_r203719813"},"pull_request":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9"}},"in_reply_to_id":203718783},"pull_request":{"url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9","id":202551340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTUxMzQw","html_url":"https://github.com/alphagov/govwifi-logging-api/pull/9","diff_url":"https://github.com/alphagov/govwifi-logging-api/pull/9.diff","patch_url":"https://github.com/alphagov/govwifi-logging-api/pull/9.patch","issue_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/9","number":9,"state":"open","locked":false,"title":"Make parameters in post-auth route optional","user":{"login":"emileswarts","id":1215147,"node_id":"MDQ6VXNlcjEyMTUxNDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1215147?v=4","gravatar_id":"","url":"https://api.github.com/users/emileswarts","html_url":"https://github.com/emileswarts","followers_url":"https://api.github.com/users/emileswarts/followers","following_url":"https://api.github.com/users/emileswarts/following{/other_user}","gists_url":"https://api.github.com/users/emileswarts/gists{/gist_id}","starred_url":"https://api.github.com/users/emileswarts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emileswarts/subscriptions","organizations_url":"https://api.github.com/users/emileswarts/orgs","repos_url":"https://api.github.com/users/emileswarts/repos","events_url":"https://api.github.com/users/emileswarts/events{/privacy}","received_events_url":"https://api.github.com/users/emileswarts/received_events","type":"User","site_admin":false},"body":"It is not garuanteed that we will receive all the parameters from the\r\nradius servers.\r\nBased on the functionality of the current backend, we will persist empty values.\r\n\r\nThis even applies to the username which doesn't make much sense because\r\nit cannot be used to identify the indivdual that was authorised.\r\n\r\nThis functionality can be changed once this current implementation has\r\nbeen proven to work in production.","created_at":"2018-07-19T13:00:03Z","updated_at":"2018-07-19T13:12:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01069d48797e245c86c396a25b4c16018e12b5ac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9/commits","review_comments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9/comments","review_comment_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/9/comments","statuses_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/statuses/1f24a63b1959e2975c604089ae5c28be92ae5cc3","head":{"label":"alphagov:option_params","ref":"option_params","sha":"1f24a63b1959e2975c604089ae5c28be92ae5cc3","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":140836822,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4MzY4MjI=","name":"govwifi-logging-api","full_name":"alphagov/govwifi-logging-api","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govwifi-logging-api","description":"GovWifi Logging API","fork":false,"url":"https://api.github.com/repos/alphagov/govwifi-logging-api","forks_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/forks","keys_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/teams","hooks_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/events","assignees_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/tags","blobs_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/subscription","commits_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/merges","archive_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/downloads","issues_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/deployments","created_at":"2018-07-13T11:04:15Z","updated_at":"2018-07-19T11:09:44Z","pushed_at":"2018-07-19T13:00:04Z","git_url":"git://github.com/alphagov/govwifi-logging-api.git","ssh_url":"git@github.com:alphagov/govwifi-logging-api.git","clone_url":"https://github.com/alphagov/govwifi-logging-api.git","svn_url":"https://github.com/alphagov/govwifi-logging-api","homepage":"","size":16,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"c207fb0c9b0cb6fc7c7e156a3f195b0fa19183f0","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":140836822,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4MzY4MjI=","name":"govwifi-logging-api","full_name":"alphagov/govwifi-logging-api","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govwifi-logging-api","description":"GovWifi Logging API","fork":false,"url":"https://api.github.com/repos/alphagov/govwifi-logging-api","forks_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/forks","keys_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/teams","hooks_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/events","assignees_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/tags","blobs_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/subscription","commits_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/merges","archive_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/downloads","issues_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govwifi-logging-api/deployments","created_at":"2018-07-13T11:04:15Z","updated_at":"2018-07-19T11:09:44Z","pushed_at":"2018-07-19T13:00:04Z","git_url":"git://github.com/alphagov/govwifi-logging-api.git","ssh_url":"git@github.com:alphagov/govwifi-logging-api.git","clone_url":"https://github.com/alphagov/govwifi-logging-api.git","svn_url":"https://github.com/alphagov/govwifi-logging-api","homepage":"","size":16,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"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","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9"},"html":{"href":"https://github.com/alphagov/govwifi-logging-api/pull/9"},"issue":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/9"},"comments":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govwifi-logging-api/statuses/1f24a63b1959e2975c604089ae5c28be92ae5cc3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"emileswarts"}}