{"action":"created","comment":{"url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/comments/33485059","id":33485059,"diff_hunk":"@@ -0,0 +1,35 @@\n+var fs = require('fs');\n+var _ = require('underscore');\n+\n+module.exports = {\n+  'desc' : 'Update An Existing Submission',\n+  'examples' : [{ cmd : 'fhc appforms environments submissions update --environment=<Environment Id> --id=<Submission ID> --submissiondata=<Path To JSON Submission Data> ', desc : 'Update An Existing Submission'}],\n+  'demand' : ['environment', 'id', 'submissiondata'],\n+  'alias' : {},\n+  'describe' : {\n+    'environment': \"Environment Id\",\n+    'submissiondata': \"Path To JSON Submission Data\",\n+    'id': \"Submission ID\"\n+  },\n+  'url' : function(params){\n+    return \"/api/v2/mbaas/\" + params.environment + \"/appforms/submissions/\" + params.id;\n+  },\n+  'preCmd' : function(params, cb){\n+    var submissionDataPath = params.submissiondata;\n+\n+    //Reading The File Passed For Form Content\n+    fs.readFile(submissionDataPath, function(err, submissionFileContent){\n+      submissionFileContent = submissionFileContent || \"\";","path":"lib/cmd/fh3/appforms/environments/submissions/update.js","position":22,"original_position":22,"commit_id":"f06a86bedf62b37b6cf4b928b54730233d459d69","original_commit_id":"f06a86bedf62b37b6cf4b928b54730233d459d69","user":{"login":"cianclarke","id":512937,"avatar_url":"https://avatars.githubusercontent.com/u/512937?v=3","gravatar_id":"","url":"https://api.github.com/users/cianclarke","html_url":"https://github.com/cianclarke","followers_url":"https://api.github.com/users/cianclarke/followers","following_url":"https://api.github.com/users/cianclarke/following{/other_user}","gists_url":"https://api.github.com/users/cianclarke/gists{/gist_id}","starred_url":"https://api.github.com/users/cianclarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cianclarke/subscriptions","organizations_url":"https://api.github.com/users/cianclarke/orgs","repos_url":"https://api.github.com/users/cianclarke/repos","events_url":"https://api.github.com/users/cianclarke/events{/privacy}","received_events_url":"https://api.github.com/users/cianclarke/received_events","type":"User","site_admin":false},"body":"Maybe check for err here? \r\nI know submissionFileContent will cause the try/catch to fail, but a more meaningful error will be populated here than below","created_at":"2015-06-29T16:50:56Z","updated_at":"2015-06-29T16:50:56Z","html_url":"https://github.com/feedhenry/fh-fhc/pull/129#discussion_r33485059","pull_request_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/comments/33485059"},"html":{"href":"https://github.com/feedhenry/fh-fhc/pull/129#discussion_r33485059"},"pull_request":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129","id":36324079,"html_url":"https://github.com/feedhenry/fh-fhc/pull/129","diff_url":"https://github.com/feedhenry/fh-fhc/pull/129.diff","patch_url":"https://github.com/feedhenry/fh-fhc/pull/129.patch","issue_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/129","number":129,"state":"open","locked":false,"title":"Fhmap 451 add new forms api","user":{"login":"nialldonnellyfh","id":5014661,"avatar_url":"https://avatars.githubusercontent.com/u/5014661?v=3","gravatar_id":"","url":"https://api.github.com/users/nialldonnellyfh","html_url":"https://github.com/nialldonnellyfh","followers_url":"https://api.github.com/users/nialldonnellyfh/followers","following_url":"https://api.github.com/users/nialldonnellyfh/following{/other_user}","gists_url":"https://api.github.com/users/nialldonnellyfh/gists{/gist_id}","starred_url":"https://api.github.com/users/nialldonnellyfh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nialldonnellyfh/subscriptions","organizations_url":"https://api.github.com/users/nialldonnellyfh/orgs","repos_url":"https://api.github.com/users/nialldonnellyfh/repos","events_url":"https://api.github.com/users/nialldonnellyfh/events{/privacy}","received_events_url":"https://api.github.com/users/nialldonnellyfh/received_events","type":"User","site_admin":false},"body":"The Appforms APIs have all been refactored to use the new command format for fhc.\r\n\r\nAdditionally, the API includes all of the commands necessary for performing LCM management actions.\r\n\r\n@cianclarke if you get a chance, can you take a look.","created_at":"2015-05-27T16:45:34Z","updated_at":"2015-06-29T16:50:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1b68a22cdde189de74f273ef31ea6c453e7a373","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129/commits","review_comments_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129/comments","review_comment_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/129/comments","statuses_url":"https://api.github.com/repos/feedhenry/fh-fhc/statuses/f06a86bedf62b37b6cf4b928b54730233d459d69","head":{"label":"feedhenry:FHMAP-451_Add-New-Forms-API","ref":"FHMAP-451_Add-New-Forms-API","sha":"f06a86bedf62b37b6cf4b928b54730233d459d69","user":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"repo":{"id":2850815,"name":"fh-fhc","full_name":"feedhenry/fh-fhc","owner":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/feedhenry/fh-fhc","description":"FeedHenry CLI, the Command Line Interface to FeedHenry","fork":false,"url":"https://api.github.com/repos/feedhenry/fh-fhc","forks_url":"https://api.github.com/repos/feedhenry/fh-fhc/forks","keys_url":"https://api.github.com/repos/feedhenry/fh-fhc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feedhenry/fh-fhc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feedhenry/fh-fhc/teams","hooks_url":"https://api.github.com/repos/feedhenry/fh-fhc/hooks","issue_events_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/events{/number}","events_url":"https://api.github.com/repos/feedhenry/fh-fhc/events","assignees_url":"https://api.github.com/repos/feedhenry/fh-fhc/assignees{/user}","branches_url":"https://api.github.com/repos/feedhenry/fh-fhc/branches{/branch}","tags_url":"https://api.github.com/repos/feedhenry/fh-fhc/tags","blobs_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/refs{/sha}","trees_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feedhenry/fh-fhc/statuses/{sha}","languages_url":"https://api.github.com/repos/feedhenry/fh-fhc/languages","stargazers_url":"https://api.github.com/repos/feedhenry/fh-fhc/stargazers","contributors_url":"https://api.github.com/repos/feedhenry/fh-fhc/contributors","subscribers_url":"https://api.github.com/repos/feedhenry/fh-fhc/subscribers","subscription_url":"https://api.github.com/repos/feedhenry/fh-fhc/subscription","commits_url":"https://api.github.com/repos/feedhenry/fh-fhc/commits{/sha}","git_commits_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/commits{/sha}","comments_url":"https://api.github.com/repos/feedhenry/fh-fhc/comments{/number}","issue_comment_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/comments{/number}","contents_url":"https://api.github.com/repos/feedhenry/fh-fhc/contents/{+path}","compare_url":"https://api.github.com/repos/feedhenry/fh-fhc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feedhenry/fh-fhc/merges","archive_url":"https://api.github.com/repos/feedhenry/fh-fhc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feedhenry/fh-fhc/downloads","issues_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues{/number}","pulls_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls{/number}","milestones_url":"https://api.github.com/repos/feedhenry/fh-fhc/milestones{/number}","notifications_url":"https://api.github.com/repos/feedhenry/fh-fhc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feedhenry/fh-fhc/labels{/name}","releases_url":"https://api.github.com/repos/feedhenry/fh-fhc/releases{/id}","created_at":"2011-11-25T16:34:58Z","updated_at":"2015-04-21T12:06:53Z","pushed_at":"2015-06-26T12:37:13Z","git_url":"git://github.com/feedhenry/fh-fhc.git","ssh_url":"git@github.com:feedhenry/fh-fhc.git","clone_url":"https://github.com/feedhenry/fh-fhc.git","svn_url":"https://github.com/feedhenry/fh-fhc","homepage":"","size":3590,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":6,"forks":26,"open_issues":6,"watchers":22,"default_branch":"master"}},"base":{"label":"feedhenry:FH-42_Forms-Lifecycle-Backend-Integration","ref":"FH-42_Forms-Lifecycle-Backend-Integration","sha":"db34c8924cbe63459f350cb38ccf21f164f9f609","user":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"repo":{"id":2850815,"name":"fh-fhc","full_name":"feedhenry/fh-fhc","owner":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/feedhenry/fh-fhc","description":"FeedHenry CLI, the Command Line Interface to FeedHenry","fork":false,"url":"https://api.github.com/repos/feedhenry/fh-fhc","forks_url":"https://api.github.com/repos/feedhenry/fh-fhc/forks","keys_url":"https://api.github.com/repos/feedhenry/fh-fhc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feedhenry/fh-fhc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feedhenry/fh-fhc/teams","hooks_url":"https://api.github.com/repos/feedhenry/fh-fhc/hooks","issue_events_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/events{/number}","events_url":"https://api.github.com/repos/feedhenry/fh-fhc/events","assignees_url":"https://api.github.com/repos/feedhenry/fh-fhc/assignees{/user}","branches_url":"https://api.github.com/repos/feedhenry/fh-fhc/branches{/branch}","tags_url":"https://api.github.com/repos/feedhenry/fh-fhc/tags","blobs_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/refs{/sha}","trees_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feedhenry/fh-fhc/statuses/{sha}","languages_url":"https://api.github.com/repos/feedhenry/fh-fhc/languages","stargazers_url":"https://api.github.com/repos/feedhenry/fh-fhc/stargazers","contributors_url":"https://api.github.com/repos/feedhenry/fh-fhc/contributors","subscribers_url":"https://api.github.com/repos/feedhenry/fh-fhc/subscribers","subscription_url":"https://api.github.com/repos/feedhenry/fh-fhc/subscription","commits_url":"https://api.github.com/repos/feedhenry/fh-fhc/commits{/sha}","git_commits_url":"https://api.github.com/repos/feedhenry/fh-fhc/git/commits{/sha}","comments_url":"https://api.github.com/repos/feedhenry/fh-fhc/comments{/number}","issue_comment_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues/comments{/number}","contents_url":"https://api.github.com/repos/feedhenry/fh-fhc/contents/{+path}","compare_url":"https://api.github.com/repos/feedhenry/fh-fhc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feedhenry/fh-fhc/merges","archive_url":"https://api.github.com/repos/feedhenry/fh-fhc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feedhenry/fh-fhc/downloads","issues_url":"https://api.github.com/repos/feedhenry/fh-fhc/issues{/number}","pulls_url":"https://api.github.com/repos/feedhenry/fh-fhc/pulls{/number}","milestones_url":"https://api.github.com/repos/feedhenry/fh-fhc/milestones{/number}","notifications_url":"https://api.github.com/repos/feedhenry/fh-fhc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feedhenry/fh-fhc/labels{/name}","releases_url":"https://api.github.com/repos/feedhenry/fh-fhc/releases{/id}","created_at":"2011-11-25T16:34:58Z","updated_at":"2015-04-21T12:06:53Z","pushed_at":"2015-06-26T12:37:13Z","git_url":"git://github.com/feedhenry/fh-fhc.git","ssh_url":"git@github.com:feedhenry/fh-fhc.git","clone_url":"https://github.com/feedhenry/fh-fhc.git","svn_url":"https://github.com/feedhenry/fh-fhc","homepage":"","size":3590,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":6,"forks":26,"open_issues":6,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129"},"html":{"href":"https://github.com/feedhenry/fh-fhc/pull/129"},"issue":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/issues/129"},"comments":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/feedhenry/fh-fhc/statuses/f06a86bedf62b37b6cf4b928b54730233d459d69"}}}}