{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/comments/70860183","id":70860183,"diff_hunk":"@@ -1,5 +1,37 @@\n-import OsfAdapter from './osf-adapter';\n+import DS from 'ember-data';\n+export default DS.JSONAPIAdapter.extend({\n+    host: 'http://localhost:8000',\n+    buildURL(modelName, id, snapshot, requestType) {\n+        // Fix issue where CORS request failed on 301s: Ember does not seem to append trailing\n+        // slash to URLs for single documents, but DRF redirects to force a trailing slash\n+        var url = this._super(...arguments);\n+        if (requestType === 'deleteRecord' || requestType === 'updateRecord' || requestType === 'findRecord') {\n+            if (snapshot.record.get('links.self')) {\n+                url = snapshot.record.get('links.self');\n+            }\n+        }\n+        if (url.lastIndexOf('/') !== url.length - 1) {\n+            url += '/';\n+        }\n+        return url;\n+    },\n+    ajax: function(url, method, hash) {\n+\t\thash.crossDomain = true;\n+\t\thash.xhrFields = {withCredentials: true};\n+\t\treturn this._super(url, method, hash);\n+  \t},\n+  \theaders: Ember.computed(function() {\n+  \t\tvar csrftoken = \"\"\n+  \t\ttry {\n+  \t\t\tvar csrftoken = Ember.get(document.cookie.match(/csrftoken\\=([^;]*)/), \"1\")\n+  \t\t} catch(e){\n+  \t\t\tconsole.log(e)","path":"app/adapters/application.js","position":29,"original_position":29,"commit_id":"4410faee558bd41074cc002e12d65479c5062b32","original_commit_id":"4410faee558bd41074cc002e12d65479c5062b32","user":{"login":"Ghalko","id":5169088,"avatar_url":"https://avatars.githubusercontent.com/u/5169088?v=3","gravatar_id":"","url":"https://api.github.com/users/Ghalko","html_url":"https://github.com/Ghalko","followers_url":"https://api.github.com/users/Ghalko/followers","following_url":"https://api.github.com/users/Ghalko/following{/other_user}","gists_url":"https://api.github.com/users/Ghalko/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghalko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghalko/subscriptions","organizations_url":"https://api.github.com/users/Ghalko/orgs","repos_url":"https://api.github.com/users/Ghalko/repos","events_url":"https://api.github.com/users/Ghalko/events{/privacy}","received_events_url":"https://api.github.com/users/Ghalko/received_events","type":"User","site_admin":false},"body":"Maybe use an ember error.","created_at":"2016-07-14T18:39:38Z","updated_at":"2016-07-14T18:39:38Z","html_url":"https://github.com/CenterForOpenScience/osf-meetings/pull/28#discussion_r70860183","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/comments/70860183"},"html":{"href":"https://github.com/CenterForOpenScience/osf-meetings/pull/28#discussion_r70860183"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28","id":77501121,"html_url":"https://github.com/CenterForOpenScience/osf-meetings/pull/28","diff_url":"https://github.com/CenterForOpenScience/osf-meetings/pull/28.diff","patch_url":"https://github.com/CenterForOpenScience/osf-meetings/pull/28.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/28","number":28,"state":"open","locked":false,"title":"Application adapter fix [OSF-6698]","user":{"login":"jnayak1","id":11620890,"avatar_url":"https://avatars.githubusercontent.com/u/11620890?v=3","gravatar_id":"","url":"https://api.github.com/users/jnayak1","html_url":"https://github.com/jnayak1","followers_url":"https://api.github.com/users/jnayak1/followers","following_url":"https://api.github.com/users/jnayak1/following{/other_user}","gists_url":"https://api.github.com/users/jnayak1/gists{/gist_id}","starred_url":"https://api.github.com/users/jnayak1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnayak1/subscriptions","organizations_url":"https://api.github.com/users/jnayak1/orgs","repos_url":"https://api.github.com/users/jnayak1/repos","events_url":"https://api.github.com/users/jnayak1/events{/privacy}","received_events_url":"https://api.github.com/users/jnayak1/received_events","type":"User","site_admin":false},"body":"Switches to using JSONAPIAdapter instead of OsfAdapter. Since we are not making requests from ember to OSF directly, there is no need to use OsfAdapter. Fixes CSRF issues by placing CSRF token in header.\r\n\r\nIssues:\r\n-When user first goes to localhost:4200, there is no csrf token present, causing adapter to error","created_at":"2016-07-14T18:18:33Z","updated_at":"2016-07-14T18:39:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"072304ce009838b861e5ddff6411334c59f1d714","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/28/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/statuses/4410faee558bd41074cc002e12d65479c5062b32","head":{"label":"jnayak1:application_adapter_fix","ref":"application_adapter_fix","sha":"4410faee558bd41074cc002e12d65479c5062b32","user":{"login":"jnayak1","id":11620890,"avatar_url":"https://avatars.githubusercontent.com/u/11620890?v=3","gravatar_id":"","url":"https://api.github.com/users/jnayak1","html_url":"https://github.com/jnayak1","followers_url":"https://api.github.com/users/jnayak1/followers","following_url":"https://api.github.com/users/jnayak1/following{/other_user}","gists_url":"https://api.github.com/users/jnayak1/gists{/gist_id}","starred_url":"https://api.github.com/users/jnayak1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnayak1/subscriptions","organizations_url":"https://api.github.com/users/jnayak1/orgs","repos_url":"https://api.github.com/users/jnayak1/repos","events_url":"https://api.github.com/users/jnayak1/events{/privacy}","received_events_url":"https://api.github.com/users/jnayak1/received_events","type":"User","site_admin":false},"repo":{"id":62337849,"name":"osf-meetings","full_name":"jnayak1/osf-meetings","owner":{"login":"jnayak1","id":11620890,"avatar_url":"https://avatars.githubusercontent.com/u/11620890?v=3","gravatar_id":"","url":"https://api.github.com/users/jnayak1","html_url":"https://github.com/jnayak1","followers_url":"https://api.github.com/users/jnayak1/followers","following_url":"https://api.github.com/users/jnayak1/following{/other_user}","gists_url":"https://api.github.com/users/jnayak1/gists{/gist_id}","starred_url":"https://api.github.com/users/jnayak1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnayak1/subscriptions","organizations_url":"https://api.github.com/users/jnayak1/orgs","repos_url":"https://api.github.com/users/jnayak1/repos","events_url":"https://api.github.com/users/jnayak1/events{/privacy}","received_events_url":"https://api.github.com/users/jnayak1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jnayak1/osf-meetings","description":"OSF Meetings","fork":true,"url":"https://api.github.com/repos/jnayak1/osf-meetings","forks_url":"https://api.github.com/repos/jnayak1/osf-meetings/forks","keys_url":"https://api.github.com/repos/jnayak1/osf-meetings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jnayak1/osf-meetings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jnayak1/osf-meetings/teams","hooks_url":"https://api.github.com/repos/jnayak1/osf-meetings/hooks","issue_events_url":"https://api.github.com/repos/jnayak1/osf-meetings/issues/events{/number}","events_url":"https://api.github.com/repos/jnayak1/osf-meetings/events","assignees_url":"https://api.github.com/repos/jnayak1/osf-meetings/assignees{/user}","branches_url":"https://api.github.com/repos/jnayak1/osf-meetings/branches{/branch}","tags_url":"https://api.github.com/repos/jnayak1/osf-meetings/tags","blobs_url":"https://api.github.com/repos/jnayak1/osf-meetings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jnayak1/osf-meetings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jnayak1/osf-meetings/git/refs{/sha}","trees_url":"https://api.github.com/repos/jnayak1/osf-meetings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jnayak1/osf-meetings/statuses/{sha}","languages_url":"https://api.github.com/repos/jnayak1/osf-meetings/languages","stargazers_url":"https://api.github.com/repos/jnayak1/osf-meetings/stargazers","contributors_url":"https://api.github.com/repos/jnayak1/osf-meetings/contributors","subscribers_url":"https://api.github.com/repos/jnayak1/osf-meetings/subscribers","subscription_url":"https://api.github.com/repos/jnayak1/osf-meetings/subscription","commits_url":"https://api.github.com/repos/jnayak1/osf-meetings/commits{/sha}","git_commits_url":"https://api.github.com/repos/jnayak1/osf-meetings/git/commits{/sha}","comments_url":"https://api.github.com/repos/jnayak1/osf-meetings/comments{/number}","issue_comment_url":"https://api.github.com/repos/jnayak1/osf-meetings/issues/comments{/number}","contents_url":"https://api.github.com/repos/jnayak1/osf-meetings/contents/{+path}","compare_url":"https://api.github.com/repos/jnayak1/osf-meetings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jnayak1/osf-meetings/merges","archive_url":"https://api.github.com/repos/jnayak1/osf-meetings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jnayak1/osf-meetings/downloads","issues_url":"https://api.github.com/repos/jnayak1/osf-meetings/issues{/number}","pulls_url":"https://api.github.com/repos/jnayak1/osf-meetings/pulls{/number}","milestones_url":"https://api.github.com/repos/jnayak1/osf-meetings/milestones{/number}","notifications_url":"https://api.github.com/repos/jnayak1/osf-meetings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jnayak1/osf-meetings/labels{/name}","releases_url":"https://api.github.com/repos/jnayak1/osf-meetings/releases{/id}","deployments_url":"https://api.github.com/repos/jnayak1/osf-meetings/deployments","created_at":"2016-06-30T19:43:05Z","updated_at":"2016-07-13T13:36:45Z","pushed_at":"2016-07-14T18:37:42Z","git_url":"git://github.com/jnayak1/osf-meetings.git","ssh_url":"git@github.com:jnayak1/osf-meetings.git","clone_url":"https://github.com/jnayak1/osf-meetings.git","svn_url":"https://github.com/jnayak1/osf-meetings","homepage":null,"size":11406,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"79cacfacd1cbb0489bb6eb86e4ac5a40df67b2a2","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":62246160,"name":"osf-meetings","full_name":"CenterForOpenScience/osf-meetings","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf-meetings","description":"OSF Meetings","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/deployments","created_at":"2016-06-29T17:50:58Z","updated_at":"2016-07-07T20:56:53Z","pushed_at":"2016-07-14T18:37:42Z","git_url":"git://github.com/CenterForOpenScience/osf-meetings.git","ssh_url":"git@github.com:CenterForOpenScience/osf-meetings.git","clone_url":"https://github.com/CenterForOpenScience/osf-meetings.git","svn_url":"https://github.com/CenterForOpenScience/osf-meetings","homepage":null,"size":11438,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28"},"html":{"href":"https://github.com/CenterForOpenScience/osf-meetings/pull/28"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/28"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf-meetings/statuses/4410faee558bd41074cc002e12d65479c5062b32"}}}}
{"actor":{"display_login":"Ghalko"}}