michelmansour / virgil

A delightful way to share, discuss, and annotate poetry
MIT License
2 stars 2 forks source link

Fix ajax POST for a poem #7

Closed drewrey closed 8 years ago

drewrey commented 8 years ago

This fixes a bug where the id field of a poem was being converted to a string after being sent to the server and before being saved to a file. This behavior is fixed when both re-ordering poems and when adding a new poem. Also, the server now uses bodyParser.json and so expects request bodies to be json.

michelmansour commented 8 years ago

Making the same change on client in handlePoemSubmit seems to fix the issue you found with adding a new poem. The server code doesn't need to change.

drewrey commented 8 years ago

Just pushed a fix with an updated commit message.