explicitly make new spaces private

This commit is contained in:
mntmn 2020-04-09 15:23:14 +02:00
parent 92cf6c4397
commit ecdacd6e11

View File

@ -166,6 +166,7 @@ router.post('/', function(req, res, next) {
attrs.creator_id = req.user._id; attrs.creator_id = req.user._id;
attrs.edit_hash = crypto.randomBytes(64).toString('hex').substring(0, 7); attrs.edit_hash = crypto.randomBytes(64).toString('hex').substring(0, 7);
attrs.edit_slug = slug(attrs.name); attrs.edit_slug = slug(attrs.name);
attrs.access_mode = "private";
db.Space.create(attrs).then(createdSpace => { db.Space.create(attrs).then(createdSpace => {
res.status(201).json(createdSpace); res.status(201).json(createdSpace);