Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endpoints seem wrong? #10

Open
ralyodio opened this issue May 18, 2015 · 5 comments
Open

endpoints seem wrong? #10

ralyodio opened this issue May 18, 2015 · 5 comments
Assignees

Comments

@ralyodio
Copy link

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.

@coffeemug
Copy link

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.

@danielmewes
Copy link
Member

Pinging @deontologician (though I think this isn't super critical).

@deontologician
Copy link
Contributor

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
#10 to
@deontologician https://github.com/deontologician.


Reply to this email directly or view it on GitHub
#10 (comment)
.

@Prinzhorn
Copy link
Contributor

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

@ralyodio
Copy link
Author

woops. wrong button

I can help out with rewriting for koa

@ralyodio ralyodio reopened this May 31, 2015
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

No branches or pull requests

5 participants