Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Website/docs/jsdoc/module-user.html
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
832 lines (260 sloc)
9.93 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>JSDoc: Module: user</title> | |
<script src="scripts/prettify/prettify.js"> </script> | |
<script src="scripts/prettify/lang-css.js"> </script> | |
<!--[if lt IE 9]> | |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> | |
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> | |
</head> | |
<body> | |
<div id="main"> | |
<h1 class="page-title">Module: user</h1> | |
<section> | |
<header> | |
</header> | |
<article> | |
<div class="container-overview"> | |
<div class="description">User Module.</div> | |
<dl class="details"> | |
<dt class="tag-source">Source:</dt> | |
<dd class="tag-source"><ul class="dummy"><li> | |
<a href="modules_user.js.html">modules/user.js</a>, <a href="modules_user.js.html#line9">line 9</a> | |
</li></ul></dd> | |
</dl> | |
</div> | |
<h3 class="subsection-title">Classes</h3> | |
<dl> | |
<dt><a href="module-user.user.html">user</a></dt> | |
<dd></dd> | |
</dl> | |
<h3 class="subsection-title">Methods</h3> | |
<h4 class="name" id="login"><span class="type-signature">(async, static) </span>module.exports#login<span class="signature">(username, password)</span><span class="type-signature"> → {boolean}</span></h4> | |
<div class="description"> | |
Logs a user on to the system. | |
</div> | |
<h5>Parameters:</h5> | |
<table class="params"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Type</th> | |
<th class="last">Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td class="name"><code>username</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Path to the file</td> | |
</tr> | |
<tr> | |
<td class="name"><code>password</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Name of the file.</td> | |
</tr> | |
</tbody> | |
</table> | |
<dl class="details"> | |
<dt class="tag-source">Source:</dt> | |
<dd class="tag-source"><ul class="dummy"><li> | |
<a href="modules_user.js.html">modules/user.js</a>, <a href="modules_user.js.html#line85">line 85</a> | |
</li></ul></dd> | |
</dl> | |
<h5>Throws:</h5> | |
<dl> | |
<dt> | |
<div class="param-desc"> | |
No Username. | |
</div> | |
</dt> | |
<dd></dd> | |
<dt> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">NoUsername</span> | |
</dd> | |
</dl> | |
</dt> | |
<dd></dd> | |
</dl> | |
<h5>Returns:</h5> | |
<div class="param-desc"> | |
returns true on successful login, false otherwise. | |
</div> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">boolean</span> | |
</dd> | |
</dl> | |
<h4 class="name" id="register"><span class="type-signature">(async, static) </span>module.exports#register<span class="signature">(user, pass)</span><span class="type-signature"> → {boolean}</span></h4> | |
<div class="description"> | |
Registers a user on the system. | |
</div> | |
<h5>Parameters:</h5> | |
<table class="params"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Type</th> | |
<th class="last">Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td class="name"><code>user</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Username for the new user.</td> | |
</tr> | |
<tr> | |
<td class="name"><code>pass</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Password of the new user.</td> | |
</tr> | |
</tbody> | |
</table> | |
<dl class="details"> | |
<dt class="tag-source">Source:</dt> | |
<dd class="tag-source"><ul class="dummy"><li> | |
<a href="modules_user.js.html">modules/user.js</a>, <a href="modules_user.js.html#line37">line 37</a> | |
</li></ul></dd> | |
</dl> | |
<h5>Throws:</h5> | |
<dl> | |
<dt> | |
<div class="param-desc"> | |
username [user] already in use. | |
</div> | |
</dt> | |
<dd></dd> | |
<dt> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">UsernameInUse</span> | |
</dd> | |
</dl> | |
</dt> | |
<dd></dd> | |
</dl> | |
<h5>Returns:</h5> | |
<div class="param-desc"> | |
returns true on success. | |
</div> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">boolean</span> | |
</dd> | |
</dl> | |
<h4 class="name" id="uploadAvatar"><span class="type-signature">(async, static) </span>module.exports#uploadAvatar<span class="signature">(path, name, username)</span><span class="type-signature"> → {integer}</span></h4> | |
<div class="description"> | |
Uploads an avatar. | |
</div> | |
<h5>Parameters:</h5> | |
<table class="params"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Type</th> | |
<th class="last">Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td class="name"><code>path</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Path to the file</td> | |
</tr> | |
<tr> | |
<td class="name"><code>name</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Name of the file.</td> | |
</tr> | |
<tr> | |
<td class="name"><code>username</code></td> | |
<td class="type"> | |
<span class="param-type">string</span> | |
</td> | |
<td class="description last">Password of the new user.</td> | |
</tr> | |
</tbody> | |
</table> | |
<dl class="details"> | |
<dt class="tag-source">Source:</dt> | |
<dd class="tag-source"><ul class="dummy"><li> | |
<a href="modules_user.js.html">modules/user.js</a>, <a href="modules_user.js.html#line63">line 63</a> | |
</li></ul></dd> | |
</dl> | |
<h5>Throws:</h5> | |
<dl> | |
<dt> | |
<div class="param-desc"> | |
No Username. | |
</div> | |
</dt> | |
<dd></dd> | |
<dt> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">NoUsername</span> | |
</dd> | |
</dl> | |
</dt> | |
<dd></dd> | |
</dl> | |
<h5>Returns:</h5> | |
<div class="param-desc"> | |
returns 0 if no file is uploaded. | |
</div> | |
<dl> | |
<dt> | |
Type | |
</dt> | |
<dd> | |
<span class="param-type">integer</span> | |
</dd> | |
</dl> | |
</article> | |
</section> | |
</div> | |
<nav> | |
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-download.html">download</a></li><li><a href="module-remove.html">remove</a></li><li><a href="module-upload.html">upload</a></li><li><a href="module-user.html">user</a></li></ul><h3>Classes</h3><ul><li><a href="module-download.download.html">download</a></li><li><a href="module-remove.remove.html">remove</a></li><li><a href="module-upload.upload.html">upload</a></li><li><a href="module-user.user.html">user</a></li></ul><h3>Global</h3><ul><li><a href="global.html#FileDownloadPage">File Download Page</a></li><li><a href="global.html#FileListPage">File List Page</a></li><li><a href="global.html#FileSharingPage">File Sharing Page</a></li><li><a href="global.html#HomePage">Home Page</a></li><li><a href="global.html#LogOutPage">Log Out Page</a></li><li><a href="global.html#LoginPage">Login Page</a></li><li><a href="global.html#LoginScript">Login Script</a></li><li><a href="global.html#RegisterPage">Register Page</a></li><li><a href="global.html#RegisterScript">Register Script</a></li><li><a href="global.html#UploadPage">Upload Page</a></li><li><a href="global.html#UploadScript">Upload Script</a></li></ul> | |
</nav> | |
<br class="clear"> | |
<footer> | |
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Mon Nov 25 2019 17:25:00 GMT+0000 (Greenwich Mean Time) | |
</footer> | |
<script> prettyPrint(); </script> | |
<script src="scripts/linenumber.js"> </script> | |
</body> | |
</html> |