mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
New 'users' collection for auth
This commit is contained in:
+21
-2
@@ -1,5 +1,5 @@
|
||||
conn = new Mongo()
|
||||
db = conn.getDB("gohcms")
|
||||
const conn = new Mongo()
|
||||
const db = conn.getDB("gohcms")
|
||||
|
||||
db.createCollection('articles', {
|
||||
validator: {
|
||||
@@ -23,3 +23,22 @@ db.createCollection('articles', {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
db.createCollection('users', {
|
||||
validator: {
|
||||
$jsonSchema: {
|
||||
required: ['email', 'password'],
|
||||
properties: {
|
||||
_id: {
|
||||
bsonType: 'objectId'
|
||||
},
|
||||
email: {
|
||||
bsonType: 'string'
|
||||
},
|
||||
password: {
|
||||
bsonType: 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user