mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
backend: auth checks
This commit is contained in:
parent
5025a43dbd
commit
c456f938b1
6 changed files with 59 additions and 29 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue