backend: auth checks

This commit is contained in:
muerwre 2018-11-29 16:56:01 +07:00
parent 5025a43dbd
commit c456f938b1
6 changed files with 59 additions and 29 deletions

View file

@ -13,16 +13,3 @@ const database = mongoose.connection;
database.on('error', (err) => { console.error(`Database Connection Error: ${err}`); process.exit(2); });
database.on('connected', () => { console.info('Succesfully connected to MongoDB Database'); });
const Schema = mongoose.Schema;
// Schemas
const User = new Schema({
id: { type: String, required: true },
role: { type: String, required: true },
token: { type: String, required: true },
});
const UserModel = mongoose.model('User', User);
module.exports.UserModel = UserModel;