Skip to content

Lab 9 - Britt#20

Open
goodbye-internet wants to merge 21 commits intocodefellows-seattle-javascript-401d12:masterfrom
goodbye-internet:16-persistent-storage
Open

Lab 9 - Britt#20
goodbye-internet wants to merge 21 commits intocodefellows-seattle-javascript-401d12:masterfrom
goodbye-internet:16-persistent-storage

Conversation

@goodbye-internet
Copy link
Copy Markdown

Thanks to @geoffsimons for posting in Slack that you can delete a file using fs.unlink. That was not intuitive in the Node docs - as Steven originally pointed out.

Comment thread README.md
Transfer-Encoding: chunked

not found
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome docs 👍

Comment thread lib/storage.js
if (!id) return Promise.reject(new Error('expected id'));

return fs.unlinkProm(`${__dirname}/../data/${schemaName}/${id}.json`)
.then( () => id)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Promise is getting passed in the route so your .then isn't necessary here, just the .catch should be good :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

Comment thread test/song-route-test.js
});
});
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants