pmo pmo pmo

This commit is contained in:
Fayzan Naufal Suparjo 2025-04-19 23:29:17 +07:00
parent 3b3ae08985
commit 7e55d74c19

View file

@ -18,7 +18,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const users = db.collection('users');
const invitations = db.collection('invitations');
const user = await users.findOne({ id: uid });
if (!user) return res.status(404).json({ message: 'User not found.' });
if (!user.platform.staff) return res.status(403).json({ message: 'Forbidden.' });