New 'users' collection for auth
This commit is contained in:
1 parent
351b8af31b
commit
5b284b1839
1 file changed
+21
-2
+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