INNER CODE UNIT · JavaScript

upperFirst

diegohaz/rest · generators/app/templates/api/auth/index.js:38

var upperFirst = service.charAt(0).toUpperCase() + service.slice(1);
_%>
/**
 * @api {post} /auth/<%= service %> Authenticate with <%= upperFirst %>
 * @apiName Authenticate<%= upperFirst %>
 * @apiGroup Auth
 * @apiParam {String} access_token <%= upperFirst %> user accessToken.
 * @apiSuccess (Success 201) {String} token User `access_token` to be passed to other requests.
 * @apiSuccess (Success 201) {Object} user Current user's data.
 * @apiError 401 Invalid credentials.
 */
router.post('/<%= service %>',
  <%= service %>(),
  login)

<%_ }) _%>
export default router

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…