documentation/__tests__/fixture/nearby_params.input.js
Tom MacWright 11d9045a00 Native Flow, use Jest (#767)
* build: Use Flow syntax without comments.

We're switching to Flow annotations - not Flow comments. This
gives documentation.js the ability to self-document without
JSDoc types and improves our compatibility with tools like
prettier.

Fixes #729. Fixes #709
2017-05-08 20:46:21 -04:00

14 lines
586 B
JavaScript

/** Attempt to establish a cookie-based session in exchange for credentials.
* @function
* @name sessions.create
* @param {object} credentials
* @param {string} credentials.name Login username. Also accepted as `username` or `email`.
* @param {string} credentials.password Login password
* @param {function} [callback] Gets passed `(err, { success:Boolean })`.
* @returns {Promise} promise, to be resolved on success or rejected on failure
*/
sessions.addMethod('create', 'POST / form', {
// normalize request body params
before({ body }) {}
});