{"action":"created","comment":{"url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/comments/24294978","id":24294978,"diff_hunk":"@@ -58,17 +63,28 @@ namespace ouroboros\n \n \tstd::pair<std::string, std::string> extract_group_name(const std::string& aURI)\n \t{\n-\t\tstruct slre_cap match[2];\n-\t\tslre_match(full_regex, aURI.c_str(), aURI.length(), match, 2, 0);\n-\n \t\tstd::pair<std::string, std::string> result;\n \t\t\n-\t\t//Copy group title from match to remove remaining characters\n-\t\tstd::string groupTitle(match[0].ptr);\n-\t\tgroupTitle.erase(groupTitle.begin()+match[0].len, groupTitle.end());\n+\t\t//Check if user is accessing field in root first\n+\t\tstruct slre_cap match[1];\n+\t\tif(slre_match(root_field_regex, aURI.c_str(), aURI.length(), match, 1, 0) >= 0){\n+\t\t\t//Root group is \"server\"\n+\t\t\tresult.first.assign(\"server\");","path":"src/server/rest.cpp","position":47,"original_position":47,"commit_id":"78083b19d6a23c3044fa5d20cd5d5f0bb499d83f","original_commit_id":"78083b19d6a23c3044fa5d20cd5d5f0bb499d83f","user":{"login":"gemarcano","id":4000062,"avatar_url":"https://avatars.githubusercontent.com/u/4000062?v=3","gravatar_id":"","url":"https://api.github.com/users/gemarcano","html_url":"https://github.com/gemarcano","followers_url":"https://api.github.com/users/gemarcano/followers","following_url":"https://api.github.com/users/gemarcano/following{/other_user}","gists_url":"https://api.github.com/users/gemarcano/gists{/gist_id}","starred_url":"https://api.github.com/users/gemarcano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemarcano/subscriptions","organizations_url":"https://api.github.com/users/gemarcano/orgs","repos_url":"https://api.github.com/users/gemarcano/repos","events_url":"https://api.github.com/users/gemarcano/events{/privacy}","received_events_url":"https://api.github.com/users/gemarcano/received_events","type":"User","site_admin":false},"body":"Actually, on second note, we can choose whatever we want, but we then hide that name from the users. This is accomplished in a similar manner to how we're doing extract_group_name, where we append the name to the beginning of the group.","created_at":"2015-02-08T02:16:38Z","updated_at":"2015-02-08T02:16:38Z","html_url":"https://github.com/TeamCobra/ouroboros/pull/55#discussion_r24294978","pull_request_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/comments/24294978"},"html":{"href":"https://github.com/TeamCobra/ouroboros/pull/55#discussion_r24294978"},"pull_request":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55","id":28841371,"html_url":"https://github.com/TeamCobra/ouroboros/pull/55","diff_url":"https://github.com/TeamCobra/ouroboros/pull/55.diff","patch_url":"https://github.com/TeamCobra/ouroboros/pull/55.patch","issue_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/55","number":55,"state":"open","locked":false,"title":"Accessing root fields through REST api. (Issue #37)","user":{"login":"jkugs","id":738382,"avatar_url":"https://avatars.githubusercontent.com/u/738382?v=3","gravatar_id":"","url":"https://api.github.com/users/jkugs","html_url":"https://github.com/jkugs","followers_url":"https://api.github.com/users/jkugs/followers","following_url":"https://api.github.com/users/jkugs/following{/other_user}","gists_url":"https://api.github.com/users/jkugs/gists{/gist_id}","starred_url":"https://api.github.com/users/jkugs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkugs/subscriptions","organizations_url":"https://api.github.com/users/jkugs/orgs","repos_url":"https://api.github.com/users/jkugs/repos","events_url":"https://api.github.com/users/jkugs/events{/privacy}","received_events_url":"https://api.github.com/users/jkugs/received_events","type":"User","site_admin":false},"body":"Modified the REST api to accept root fields without requiring specification that they are in the root group (server).\r\n \r\nexample: localhost:8080/fields/a_string","created_at":"2015-02-06T20:57:54Z","updated_at":"2015-02-08T02:16:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"170d9a024217fc883a96d245cbd312ffd97595e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55/commits","review_comments_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55/comments","review_comment_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/comments/{number}","comments_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/55/comments","statuses_url":"https://api.github.com/repos/TeamCobra/ouroboros/statuses/78083b19d6a23c3044fa5d20cd5d5f0bb499d83f","head":{"label":"TeamCobra:accessing_root_group_#37","ref":"accessing_root_group_#37","sha":"78083b19d6a23c3044fa5d20cd5d5f0bb499d83f","user":{"login":"TeamCobra","id":8709354,"avatar_url":"https://avatars.githubusercontent.com/u/8709354?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamCobra","html_url":"https://github.com/TeamCobra","followers_url":"https://api.github.com/users/TeamCobra/followers","following_url":"https://api.github.com/users/TeamCobra/following{/other_user}","gists_url":"https://api.github.com/users/TeamCobra/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCobra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCobra/subscriptions","organizations_url":"https://api.github.com/users/TeamCobra/orgs","repos_url":"https://api.github.com/users/TeamCobra/repos","events_url":"https://api.github.com/users/TeamCobra/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCobra/received_events","type":"Organization","site_admin":false},"repo":{"id":25535963,"name":"ouroboros","full_name":"TeamCobra/ouroboros","owner":{"login":"TeamCobra","id":8709354,"avatar_url":"https://avatars.githubusercontent.com/u/8709354?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamCobra","html_url":"https://github.com/TeamCobra","followers_url":"https://api.github.com/users/TeamCobra/followers","following_url":"https://api.github.com/users/TeamCobra/following{/other_user}","gists_url":"https://api.github.com/users/TeamCobra/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCobra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCobra/subscriptions","organizations_url":"https://api.github.com/users/TeamCobra/orgs","repos_url":"https://api.github.com/users/TeamCobra/repos","events_url":"https://api.github.com/users/TeamCobra/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCobra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamCobra/ouroboros","description":"","fork":false,"url":"https://api.github.com/repos/TeamCobra/ouroboros","forks_url":"https://api.github.com/repos/TeamCobra/ouroboros/forks","keys_url":"https://api.github.com/repos/TeamCobra/ouroboros/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamCobra/ouroboros/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamCobra/ouroboros/teams","hooks_url":"https://api.github.com/repos/TeamCobra/ouroboros/hooks","issue_events_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/events{/number}","events_url":"https://api.github.com/repos/TeamCobra/ouroboros/events","assignees_url":"https://api.github.com/repos/TeamCobra/ouroboros/assignees{/user}","branches_url":"https://api.github.com/repos/TeamCobra/ouroboros/branches{/branch}","tags_url":"https://api.github.com/repos/TeamCobra/ouroboros/tags","blobs_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamCobra/ouroboros/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamCobra/ouroboros/languages","stargazers_url":"https://api.github.com/repos/TeamCobra/ouroboros/stargazers","contributors_url":"https://api.github.com/repos/TeamCobra/ouroboros/contributors","subscribers_url":"https://api.github.com/repos/TeamCobra/ouroboros/subscribers","subscription_url":"https://api.github.com/repos/TeamCobra/ouroboros/subscription","commits_url":"https://api.github.com/repos/TeamCobra/ouroboros/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamCobra/ouroboros/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/comments/{number}","contents_url":"https://api.github.com/repos/TeamCobra/ouroboros/contents/{+path}","compare_url":"https://api.github.com/repos/TeamCobra/ouroboros/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamCobra/ouroboros/merges","archive_url":"https://api.github.com/repos/TeamCobra/ouroboros/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamCobra/ouroboros/downloads","issues_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues{/number}","pulls_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamCobra/ouroboros/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamCobra/ouroboros/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamCobra/ouroboros/labels{/name}","releases_url":"https://api.github.com/repos/TeamCobra/ouroboros/releases{/id}","created_at":"2014-10-21T17:30:31Z","updated_at":"2015-01-29T22:17:23Z","pushed_at":"2015-02-07T22:25:45Z","git_url":"git://github.com/TeamCobra/ouroboros.git","ssh_url":"git@github.com:TeamCobra/ouroboros.git","clone_url":"https://github.com/TeamCobra/ouroboros.git","svn_url":"https://github.com/TeamCobra/ouroboros","homepage":null,"size":9412,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":2,"default_branch":"master"}},"base":{"label":"TeamCobra:development","ref":"development","sha":"99d8a3bd0575a46072ca3d59aa68e923dc08db29","user":{"login":"TeamCobra","id":8709354,"avatar_url":"https://avatars.githubusercontent.com/u/8709354?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamCobra","html_url":"https://github.com/TeamCobra","followers_url":"https://api.github.com/users/TeamCobra/followers","following_url":"https://api.github.com/users/TeamCobra/following{/other_user}","gists_url":"https://api.github.com/users/TeamCobra/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCobra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCobra/subscriptions","organizations_url":"https://api.github.com/users/TeamCobra/orgs","repos_url":"https://api.github.com/users/TeamCobra/repos","events_url":"https://api.github.com/users/TeamCobra/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCobra/received_events","type":"Organization","site_admin":false},"repo":{"id":25535963,"name":"ouroboros","full_name":"TeamCobra/ouroboros","owner":{"login":"TeamCobra","id":8709354,"avatar_url":"https://avatars.githubusercontent.com/u/8709354?v=3","gravatar_id":"","url":"https://api.github.com/users/TeamCobra","html_url":"https://github.com/TeamCobra","followers_url":"https://api.github.com/users/TeamCobra/followers","following_url":"https://api.github.com/users/TeamCobra/following{/other_user}","gists_url":"https://api.github.com/users/TeamCobra/gists{/gist_id}","starred_url":"https://api.github.com/users/TeamCobra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeamCobra/subscriptions","organizations_url":"https://api.github.com/users/TeamCobra/orgs","repos_url":"https://api.github.com/users/TeamCobra/repos","events_url":"https://api.github.com/users/TeamCobra/events{/privacy}","received_events_url":"https://api.github.com/users/TeamCobra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TeamCobra/ouroboros","description":"","fork":false,"url":"https://api.github.com/repos/TeamCobra/ouroboros","forks_url":"https://api.github.com/repos/TeamCobra/ouroboros/forks","keys_url":"https://api.github.com/repos/TeamCobra/ouroboros/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TeamCobra/ouroboros/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TeamCobra/ouroboros/teams","hooks_url":"https://api.github.com/repos/TeamCobra/ouroboros/hooks","issue_events_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/events{/number}","events_url":"https://api.github.com/repos/TeamCobra/ouroboros/events","assignees_url":"https://api.github.com/repos/TeamCobra/ouroboros/assignees{/user}","branches_url":"https://api.github.com/repos/TeamCobra/ouroboros/branches{/branch}","tags_url":"https://api.github.com/repos/TeamCobra/ouroboros/tags","blobs_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/refs{/sha}","trees_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TeamCobra/ouroboros/statuses/{sha}","languages_url":"https://api.github.com/repos/TeamCobra/ouroboros/languages","stargazers_url":"https://api.github.com/repos/TeamCobra/ouroboros/stargazers","contributors_url":"https://api.github.com/repos/TeamCobra/ouroboros/contributors","subscribers_url":"https://api.github.com/repos/TeamCobra/ouroboros/subscribers","subscription_url":"https://api.github.com/repos/TeamCobra/ouroboros/subscription","commits_url":"https://api.github.com/repos/TeamCobra/ouroboros/commits{/sha}","git_commits_url":"https://api.github.com/repos/TeamCobra/ouroboros/git/commits{/sha}","comments_url":"https://api.github.com/repos/TeamCobra/ouroboros/comments{/number}","issue_comment_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues/comments/{number}","contents_url":"https://api.github.com/repos/TeamCobra/ouroboros/contents/{+path}","compare_url":"https://api.github.com/repos/TeamCobra/ouroboros/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TeamCobra/ouroboros/merges","archive_url":"https://api.github.com/repos/TeamCobra/ouroboros/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TeamCobra/ouroboros/downloads","issues_url":"https://api.github.com/repos/TeamCobra/ouroboros/issues{/number}","pulls_url":"https://api.github.com/repos/TeamCobra/ouroboros/pulls{/number}","milestones_url":"https://api.github.com/repos/TeamCobra/ouroboros/milestones{/number}","notifications_url":"https://api.github.com/repos/TeamCobra/ouroboros/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TeamCobra/ouroboros/labels{/name}","releases_url":"https://api.github.com/repos/TeamCobra/ouroboros/releases{/id}","created_at":"2014-10-21T17:30:31Z","updated_at":"2015-01-29T22:17:23Z","pushed_at":"2015-02-07T22:25:45Z","git_url":"git://github.com/TeamCobra/ouroboros.git","ssh_url":"git@github.com:TeamCobra/ouroboros.git","clone_url":"https://github.com/TeamCobra/ouroboros.git","svn_url":"https://github.com/TeamCobra/ouroboros","homepage":null,"size":9412,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55"},"html":{"href":"https://github.com/TeamCobra/ouroboros/pull/55"},"issue":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/issues/55"},"comments":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/TeamCobra/ouroboros/statuses/78083b19d6a23c3044fa5d20cd5d5f0bb499d83f"}}}}