diff --git a/api/server/middleware/messageQuota.js b/api/server/middleware/messageQuota.js index 10d1a7c571f..2ef1a4f7e59 100644 --- a/api/server/middleware/messageQuota.js +++ b/api/server/middleware/messageQuota.js @@ -3,7 +3,7 @@ const { getMessagesCount } = require('../../models'); const getUserMessageQuotaUsagePastDays = async (user, days = 30) => { let currentTime = new Date(); let quota = 0; - if ('proMemberExpiredAt' in user && user.proMemberExpiredAt > currentTime) { + if (user && 'proMemberExpiredAt' in user && user.proMemberExpiredAt > currentTime) { // If not proMember, check quota quota = JSON.parse(process.env['CHAT_QUOTA_PER_MONTH_PRO_MEMBER']); } else { diff --git a/api/server/routes/convos.js b/api/server/routes/convos.js index 93505541f57..f0a4c26f394 100644 --- a/api/server/routes/convos.js +++ b/api/server/routes/convos.js @@ -189,7 +189,7 @@ router.post('/clear', async (req, res) => { router.post('/update', async (req, res) => { const update = req.body.arg; - console.log('in update', update); + // console.log('in update', update); try { const dbResponse = await saveConvo(req.user.id, update); res.status(201).json(dbResponse); @@ -238,7 +238,7 @@ router.post('/like', async (req, res) => { router.post('/:conversationId/viewcount/increment', async (req, res) => { const { conversationId } = req.params; - console.log(`routes: hit viewcount increment router for conversationId ${conversationId}`); + // console.log(`routes: hit viewcount increment router for conversationId ${conversationId}`); try { const dbResponse = await increaseConvoViewCount(conversationId); // console.log( diff --git a/client/src/components/Auth/Login.tsx b/client/src/components/Auth/Login.tsx index f4003231176..331971268ac 100644 --- a/client/src/components/Auth/Login.tsx +++ b/client/src/components/Auth/Login.tsx @@ -119,9 +119,9 @@ function Login() { return (