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
12
backend/models/User.js
Normal file
12
backend/models/User.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
const mongoose = require('mongoose');
|
||||
const { Schema } = mongoose;
|
||||
|
||||
// Schemas
|
||||
const UserSchema = new Schema({
|
||||
id: { type: String, required: true },
|
||||
role: { type: String, required: true },
|
||||
token: { type: String, required: true },
|
||||
});
|
||||
|
||||
const User = mongoose.model('User', UserSchema);
|
||||
module.exports.User = User;
|
Loading…
Add table
Add a link
Reference in a new issue