add-user moved to auth middleware
This commit is contained in:
1 parent
14b51f3ae6
commit
03f3b1694c
2 files changed
+2
-2
No files matched your search
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
This is how Users are added to the User collection on Mongo DB.
|
||||
Note that only the authId and alias is saved during user creation.
|
||||
This means that this should only be executed from within the authentication
|
||||
process.
|
||||
*/
|
||||
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const UserSchema = require('./User')
|
||||
|
||||
class UserMongo {
|
||||
addUser ({ authId, alias }) {
|
||||
return UserSchema.create({
|
||||
authId: String,
|
||||
alias: String
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UserMongo
|
||||
Reference in new issue
Block a user