v1.7.6/show player updated by
This commit is contained in:
@@ -23,18 +23,6 @@ module.exports = async (req, res) => {
|
||||
});
|
||||
if (exists && roomPin !== bodydata.partyPin)
|
||||
return res.status(401).send({ message: 'Incorrect party pin' });
|
||||
if (adminUid === bodydata.uid) {
|
||||
await admin
|
||||
.firestore()
|
||||
.collection('rooms')
|
||||
.doc(bodydata.partyName)
|
||||
.collection('users')
|
||||
.doc(bodydata.uid)
|
||||
.set({
|
||||
admin: true,
|
||||
name: bodydata.userName,
|
||||
});
|
||||
}
|
||||
// GET IF USER EXISTS AND IS ADMIN
|
||||
const [userExists, userAdmin, userName] = await admin
|
||||
.firestore()
|
||||
@@ -101,7 +89,7 @@ module.exports = async (req, res) => {
|
||||
.collection('users')
|
||||
.doc(bodydata.uid)
|
||||
.set({
|
||||
admin: false,
|
||||
admin: adminUid === bodydata.uid,
|
||||
name: bodydata.userName,
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user