new API page in docs
This commit is contained in:
@@ -26,6 +26,20 @@ api.use(express.json())
|
||||
* @category User
|
||||
* @name /api/user
|
||||
* @type GET
|
||||
* @example **Response**
|
||||
* ```json
|
||||
{
|
||||
"description" : null,
|
||||
"recover_code" : "",
|
||||
"id" : 1,
|
||||
"createdAt" : "2020-01-29T18:10:16.630Z",
|
||||
"updatedAt" : "2020-01-30T22:42:14.789Z",
|
||||
"is_active" : true,
|
||||
"settings" : "{}",
|
||||
"email" : "eventi@cisti.org",
|
||||
"is_admin" : true
|
||||
}
|
||||
```
|
||||
*/
|
||||
api.get('/user', isAuth, (req, res) => res.json(req.user))
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
const User = sequelize.define('user', {
|
||||
settings: {
|
||||
type: DataTypes.JSON,
|
||||
defaultValue: '{}'
|
||||
defaultValue: []
|
||||
},
|
||||
email: {
|
||||
type: DataTypes.STRING,
|
||||
|
||||
Reference in New Issue
Block a user