v1.6.0/admin only mode

This commit is contained in:
2020-08-01 13:53:58 -04:00
parent 8d8cf6d276
commit 9c600f383d
15 changed files with 197 additions and 88 deletions
+1 -17
View File
@@ -24,6 +24,7 @@ module.exports = async (req, res) => {
createdAt: new Date(),
updatedAt: new Date(),
adminUid: bodydata.uid,
adminOnly: bodydata.adminOnly,
})
.catch((err) => {
res.status(500).send({ message: 'Unable to start party.' });
@@ -46,23 +47,6 @@ module.exports = async (req, res) => {
err
);
});
await admin
.firestore()
.collection('rooms')
.doc(bodydata.partyName)
.collection('messages')
.add({
uid: '<system>',
name: '',
text: `Voice calls are unavailable temporarily. Voice calls will be back within 12 hours.`,
time: new Date(),
})
.catch((err) => {
console.error(
`Failed to add system voice call message : \n\t Room: ${bodydata.partyName}`,
err
);
});
await admin
.firestore()
.collection('rooms')