mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
* 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
14 lines
586 B
JavaScript
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 }) {}
|
|
});
|