rethinkdb-example-nodejs
rethinkdb-example-nodejs copied to clipboard
endpoints seem wrong?
app.get('/todo/get', get);
app.put('/todo/new', create);
app.post('/todo/update', update);
app.post('/todo/delete', del);
Should it be this?
app.get('/todo/:id', get);
app.put('/todo/:id', update);
app.post('/todo', create);
app.delete('/todo/:id', del);
Just curious why the weird endpoints and swap of post vs. put handling.
I don't think there is a reason -- whoever wrote the example didn't seem to follow convention. We should probably update the example to use canonical REST conventions. Thanks @chovy.
Pinging @deontologician (though I think this isn't super critical).
It's in my queue, pull requests welcome though
On Tue, May 19, 2015 at 11:09 AM Daniel Mewes [email protected] wrote:
Assigned #10 https://github.com/rethinkdb/rethinkdb-example-nodejs/issues/10 to @deontologician https://github.com/deontologician.
— Reply to this email directly or view it on GitHub https://github.com/rethinkdb/rethinkdb-example-nodejs/issues/10#event-308753774 .
I did fix this for the rewrite I did (https://github.com/rethinkdb/rethinkdb-example-nodejs/blob/cbe726b46e40eb7e6b9c7c422ae0c08ba2ded037/todo-angular-express/app.js) which someone needs to port to promises and koa. #7
woops. wrong button
I can help out with rewriting for koa