{"action":"created","comment":{"url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/comments/171189033","pull_request_review_id":99996628,"id":171189033,"diff_hunk":"@@ -0,0 +1,64 @@\n+require('dotenv').config()\n+\n+const express = require('express')\n+\n+const bodyParser = require('body-parser')\n+\n+const taskApi = require('./taskapi')\n+\n+const app = express()\n+\n+\n+app.set('view engine', 'pug')\n+\n+app.get('/', (req, res) => {\n+    \n+    dones = todos = []\n+\n+    taskApi.getTasks().then(tasks => {\n+\n+        const todos = tasks.filter(task => task.status == false)\n+\n+        const dones = tasks.filter(task => task.status == true)\n+\n+        res.render('index', {todos, dones})\n+\n+\n+    })\n+\n+})\n+\n+const formBodyParser = bodyParser.urlencoded({ extended: false })\n+\n+app.post('/tasks', formBodyParser, (req, res) => {\n+    const { body: { text } } = req\n+\n+    taskApi.createTask(text); \n+\n+    res.redirect('/')","path":"staff/demi/task-app-complete/task-app/src/index.js","position":36,"original_position":38,"commit_id":"26f9c54396d1c3d585c90f78ed4838ceeaa29663","original_commit_id":"1d6847dd0125da38d125fc85c68d356d50c3dc35","user":{"login":"AlexGonRod","id":17208862,"avatar_url":"https://avatars2.githubusercontent.com/u/17208862?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexGonRod","html_url":"https://github.com/AlexGonRod","followers_url":"https://api.github.com/users/AlexGonRod/followers","following_url":"https://api.github.com/users/AlexGonRod/following{/other_user}","gists_url":"https://api.github.com/users/AlexGonRod/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexGonRod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexGonRod/subscriptions","organizations_url":"https://api.github.com/users/AlexGonRod/orgs","repos_url":"https://api.github.com/users/AlexGonRod/repos","events_url":"https://api.github.com/users/AlexGonRod/events{/privacy}","received_events_url":"https://api.github.com/users/AlexGonRod/received_events","type":"User","site_admin":false},"body":"Hay que tener en cuenta que estáis usando métodos asíncronos y que, por lo tanto, es posibe que al hacer el redirect, la página llegase a a renderizar sin resolver la 'promise'. \r\nComo sugerencia, se debería incluir el 'redirect' dentro de un .then(), de manera que no se espera para ejecutar el 'redirect'.","created_at":"2018-02-28T09:45:12Z","updated_at":"2018-02-28T09:45:33Z","html_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95#discussion_r171189033","pull_request_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/comments/171189033"},"html":{"href":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95#discussion_r171189033"},"pull_request":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95","id":171884683,"html_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95","diff_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95.diff","patch_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95.patch","issue_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/95","number":95,"state":"open","locked":false,"title":"Axios task api complete","user":{"login":"cdemiguel","id":32569122,"avatar_url":"https://avatars3.githubusercontent.com/u/32569122?v=4","gravatar_id":"","url":"https://api.github.com/users/cdemiguel","html_url":"https://github.com/cdemiguel","followers_url":"https://api.github.com/users/cdemiguel/followers","following_url":"https://api.github.com/users/cdemiguel/following{/other_user}","gists_url":"https://api.github.com/users/cdemiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/cdemiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdemiguel/subscriptions","organizations_url":"https://api.github.com/users/cdemiguel/orgs","repos_url":"https://api.github.com/users/cdemiguel/repos","events_url":"https://api.github.com/users/cdemiguel/events{/privacy}","received_events_url":"https://api.github.com/users/cdemiguel/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-28T08:26:28Z","updated_at":"2018-02-28T09:45:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99bf720f5adf019905ea61de307b2b2a31574e0c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95/commits","review_comments_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95/comments","review_comment_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/95/comments","statuses_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/statuses/26f9c54396d1c3d585c90f78ed4838ceeaa29663","head":{"label":"cdemiguel:feature/axiosTaskApi","ref":"feature/axiosTaskApi","sha":"26f9c54396d1c3d585c90f78ed4838ceeaa29663","user":{"login":"cdemiguel","id":32569122,"avatar_url":"https://avatars3.githubusercontent.com/u/32569122?v=4","gravatar_id":"","url":"https://api.github.com/users/cdemiguel","html_url":"https://github.com/cdemiguel","followers_url":"https://api.github.com/users/cdemiguel/followers","following_url":"https://api.github.com/users/cdemiguel/following{/other_user}","gists_url":"https://api.github.com/users/cdemiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/cdemiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdemiguel/subscriptions","organizations_url":"https://api.github.com/users/cdemiguel/orgs","repos_url":"https://api.github.com/users/cdemiguel/repos","events_url":"https://api.github.com/users/cdemiguel/events{/privacy}","received_events_url":"https://api.github.com/users/cdemiguel/received_events","type":"User","site_admin":false},"repo":{"id":119975330,"name":"skylab-bootcamp-201802","full_name":"cdemiguel/skylab-bootcamp-201802","owner":{"login":"cdemiguel","id":32569122,"avatar_url":"https://avatars3.githubusercontent.com/u/32569122?v=4","gravatar_id":"","url":"https://api.github.com/users/cdemiguel","html_url":"https://github.com/cdemiguel","followers_url":"https://api.github.com/users/cdemiguel/followers","following_url":"https://api.github.com/users/cdemiguel/following{/other_user}","gists_url":"https://api.github.com/users/cdemiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/cdemiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdemiguel/subscriptions","organizations_url":"https://api.github.com/users/cdemiguel/orgs","repos_url":"https://api.github.com/users/cdemiguel/repos","events_url":"https://api.github.com/users/cdemiguel/events{/privacy}","received_events_url":"https://api.github.com/users/cdemiguel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cdemiguel/skylab-bootcamp-201802","description":"FullStack WebDev BootCamp January 2018","fork":true,"url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802","forks_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/forks","keys_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/teams","hooks_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/hooks","issue_events_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/issues/events{/number}","events_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/events","assignees_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/assignees{/user}","branches_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/branches{/branch}","tags_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/tags","blobs_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/statuses/{sha}","languages_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/languages","stargazers_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/stargazers","contributors_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/contributors","subscribers_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/subscribers","subscription_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/subscription","commits_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/contents/{+path}","compare_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/merges","archive_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/downloads","issues_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/issues{/number}","pulls_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/pulls{/number}","milestones_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/milestones{/number}","notifications_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/labels{/name}","releases_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/releases{/id}","deployments_url":"https://api.github.com/repos/cdemiguel/skylab-bootcamp-201802/deployments","created_at":"2018-02-02T11:47:31Z","updated_at":"2018-02-02T11:47:33Z","pushed_at":"2018-02-28T09:24:58Z","git_url":"git://github.com/cdemiguel/skylab-bootcamp-201802.git","ssh_url":"git@github.com:cdemiguel/skylab-bootcamp-201802.git","clone_url":"https://github.com/cdemiguel/skylab-bootcamp-201802.git","svn_url":"https://github.com/cdemiguel/skylab-bootcamp-201802","homepage":"http://skylabcoders.com","size":41107,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"manuelbarzi:develop","ref":"develop","sha":"fe6da5e171822c5aeca5c2a795f270771e50fe21","user":{"login":"manuelbarzi","id":950133,"avatar_url":"https://avatars0.githubusercontent.com/u/950133?v=4","gravatar_id":"","url":"https://api.github.com/users/manuelbarzi","html_url":"https://github.com/manuelbarzi","followers_url":"https://api.github.com/users/manuelbarzi/followers","following_url":"https://api.github.com/users/manuelbarzi/following{/other_user}","gists_url":"https://api.github.com/users/manuelbarzi/gists{/gist_id}","starred_url":"https://api.github.com/users/manuelbarzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuelbarzi/subscriptions","organizations_url":"https://api.github.com/users/manuelbarzi/orgs","repos_url":"https://api.github.com/users/manuelbarzi/repos","events_url":"https://api.github.com/users/manuelbarzi/events{/privacy}","received_events_url":"https://api.github.com/users/manuelbarzi/received_events","type":"User","site_admin":false},"repo":{"id":117562019,"name":"skylab-bootcamp-201801","full_name":"manuelbarzi/skylab-bootcamp-201801","owner":{"login":"manuelbarzi","id":950133,"avatar_url":"https://avatars0.githubusercontent.com/u/950133?v=4","gravatar_id":"","url":"https://api.github.com/users/manuelbarzi","html_url":"https://github.com/manuelbarzi","followers_url":"https://api.github.com/users/manuelbarzi/followers","following_url":"https://api.github.com/users/manuelbarzi/following{/other_user}","gists_url":"https://api.github.com/users/manuelbarzi/gists{/gist_id}","starred_url":"https://api.github.com/users/manuelbarzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuelbarzi/subscriptions","organizations_url":"https://api.github.com/users/manuelbarzi/orgs","repos_url":"https://api.github.com/users/manuelbarzi/repos","events_url":"https://api.github.com/users/manuelbarzi/events{/privacy}","received_events_url":"https://api.github.com/users/manuelbarzi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801","description":"FullStack WebDev BootCamp January 2018","fork":false,"url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801","forks_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/forks","keys_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/teams","hooks_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/hooks","issue_events_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/events{/number}","events_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/events","assignees_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/assignees{/user}","branches_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/branches{/branch}","tags_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/tags","blobs_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/git/refs{/sha}","trees_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/statuses/{sha}","languages_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/languages","stargazers_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/stargazers","contributors_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/contributors","subscribers_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/subscribers","subscription_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/subscription","commits_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/commits{/sha}","git_commits_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/git/commits{/sha}","comments_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/comments{/number}","issue_comment_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/comments{/number}","contents_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/contents/{+path}","compare_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/merges","archive_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/downloads","issues_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues{/number}","pulls_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls{/number}","milestones_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/milestones{/number}","notifications_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/labels{/name}","releases_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/releases{/id}","deployments_url":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/deployments","created_at":"2018-01-15T15:25:19Z","updated_at":"2018-02-09T15:23:05Z","pushed_at":"2018-02-28T09:44:01Z","git_url":"git://github.com/manuelbarzi/skylab-bootcamp-201801.git","ssh_url":"git@github.com:manuelbarzi/skylab-bootcamp-201801.git","clone_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801.git","svn_url":"https://github.com/manuelbarzi/skylab-bootcamp-201801","homepage":"http://skylabcoders.com","size":41084,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":25,"license":null,"forks":18,"open_issues":25,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95"},"html":{"href":"https://github.com/manuelbarzi/skylab-bootcamp-201801/pull/95"},"issue":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/95"},"comments":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/manuelbarzi/skylab-bootcamp-201801/statuses/26f9c54396d1c3d585c90f78ed4838ceeaa29663"}},"author_association":"NONE"}}
{"actor":{"display_login":"AlexGonRod"}}