Skip to content

Instantly share code, notes, and snippets.

@astrotars
Last active November 10, 2021 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astrotars/7a6d882e2dfc257777f3297ba3b4c7ab to your computer and use it in GitHub Desktop.
Save astrotars/7a6d882e2dfc257777f3297ba3b4c7ab to your computer and use it in GitHub Desktop.
import User from '../controllers/user';
module.exports = api => {
api.route('/users').get(User.list);
api.route('/users/:userId').get(User.get);
api.route('/users).post(User.post);
api.route('/users/:userId').put(User.put);
api.route('/users/:userId').delete(User.delete);
};
@mikezucc
Copy link

mikezucc commented Nov 8, 2018

yo this is missing a closing apostrophe -_-

@GronsoBitburg
Copy link

GronsoBitburg commented Nov 9, 2021

Seriously, this is that old, this should have been fixed long ago.

api.route('/users).post(User.post);
should be:
api.route('/users').post(User.post);

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