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
+2 -1
View File
@@ -14,6 +14,7 @@ module.exports = async (req, res) => {
// player.time > 3600
// ? new Date(player.time * 1000).toISOString().substr(11, 8)
// : new Date(player.time * 1000).toISOString().substr(14, 5);
if (!roomId) return res.status(204).send({ message: 'Party name not sent.' });
const [roomExists, roomData] = await admin
.firestore()
.collection('rooms')
@@ -30,7 +31,7 @@ module.exports = async (req, res) => {
.get()
.then((userSnap) => userSnap.exists);
if (userExists) {
if (showChanged === true) {
if (showChanged === true && player.showName) {
await admin
.firestore()
.collection('rooms')