add-user moved to auth middleware

This commit is contained in:
Luis Fernando Molina committed 2018-09-14 11:20:29 +02:00
1 parent 14b51f3ae6
commit 03f3b1694c
2 files changed
+2 -2

No files matched your search

-21
View File
@@ -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