{"action":"created","issue":{"url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/40","repository_url":"https://api.github.com/repos/trendmicro/serverless-survey-forms","labels_url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/40/comments","events_url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/40/events","html_url":"https://github.com/trendmicro/serverless-survey-forms/pull/40","id":175002002,"number":40,"title":"Extend delete one feedback api to support delete all feedbacks.","user":{"login":"wilsonhsu98","id":9699915,"avatar_url":"https://avatars.githubusercontent.com/u/9699915?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonhsu98","html_url":"https://github.com/wilsonhsu98","followers_url":"https://api.github.com/users/wilsonhsu98/followers","following_url":"https://api.github.com/users/wilsonhsu98/following{/other_user}","gists_url":"https://api.github.com/users/wilsonhsu98/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonhsu98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonhsu98/subscriptions","organizations_url":"https://api.github.com/users/wilsonhsu98/orgs","repos_url":"https://api.github.com/users/wilsonhsu98/repos","events_url":"https://api.github.com/users/wilsonhsu98/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonhsu98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-05T06:16:16Z","updated_at":"2016-09-06T05:40:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/pulls/40","html_url":"https://github.com/trendmicro/serverless-survey-forms/pull/40","diff_url":"https://github.com/trendmicro/serverless-survey-forms/pull/40.diff","patch_url":"https://github.com/trendmicro/serverless-survey-forms/pull/40.patch"},"body":"1) Extend delete one feedback api to support delete all feedbacks.\r\n2) Adjust unit test."},"comment":{"url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/comments/244854532","html_url":"https://github.com/trendmicro/serverless-survey-forms/pull/40#issuecomment-244854532","issue_url":"https://api.github.com/repos/trendmicro/serverless-survey-forms/issues/40","id":244854532,"user":{"login":"jonascheng","id":13446971,"avatar_url":"https://avatars.githubusercontent.com/u/13446971?v=3","gravatar_id":"","url":"https://api.github.com/users/jonascheng","html_url":"https://github.com/jonascheng","followers_url":"https://api.github.com/users/jonascheng/followers","following_url":"https://api.github.com/users/jonascheng/following{/other_user}","gists_url":"https://api.github.com/users/jonascheng/gists{/gist_id}","starred_url":"https://api.github.com/users/jonascheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonascheng/subscriptions","organizations_url":"https://api.github.com/users/jonascheng/orgs","repos_url":"https://api.github.com/users/jonascheng/repos","events_url":"https://api.github.com/users/jonascheng/events{/privacy}","received_events_url":"https://api.github.com/users/jonascheng/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T05:40:25Z","updated_at":"2016-09-06T05:40:25Z","body":"Hi Wilson,\r\n\r\n  It's ok to provide API to frontend, and no concern for this now.\r\n\r\n  Another deleteFeedbacks issue, I misunderstood your code and I didn't make myself clear.\r\n  I meant you should be able to invoke dynamodb api without providing clientid instead of looping all feedbacks. In short, please check if you could remove listFeedbacks to save DDB multiple access time. Thanks!\r\n\r\n      } else if (event.surveyid && process.env.SERVERLESS_FEEDBACKTABLE) {\r\n -    else {\t\t +        listFeedbacks(event).then(response => {\r\n -      return callback(new Error(\"400 Bad Request: Missing parameters: \" + JSON.stringify(event)), null);\t\t +          Promise.all(response.feedbacks.map(item => deleteFeedbacks(item))).then(() => {\r\n -    }\t\t +            resolve({});\r\n +          });\r\n +        }).catch(err => {\r\n +          reject(err, null);\r\n +        });\r\n\r\n\r\nThanks,\r\nJonas"}}
{"actor":{"display_login":"jonascheng"}}