v1.6.0/admin only mode
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user