fixed issue with user creation

This commit is contained in:
2020-04-12 19:24:55 -04:00
parent ab108ebec8
commit 7d9ea08ec9
3 changed files with 3 additions and 9 deletions

View File

@ -1,6 +1,6 @@
'use strict';
const Host = new require('../utils/redis_model')({
const Host = require('../utils/redis_model')({
_name: 'host',
_key: 'host',
_keyMap: {

View File

@ -15,6 +15,8 @@ router.get('/', async function(req, res, next){
router.post('/', async function(req, res, next){
try{
req.body.created_by = req.user.username
return res.json({results: await User.add(req.body)});
}catch(error){
next(error);

View File

@ -177,14 +177,6 @@ table.remove = async function(data){
}
};
table.createInstance = function(data){
// this.__proto__ = data;
return this
}
function Table(data){
// Create a table instance.
let instance = Object.create(data);