bug fixed + add support for google profile pics

This commit is contained in:
daniel31x13
2024-05-07 16:59:00 -04:00
parent 2dd49ff844
commit 861f8e55f4
8 changed files with 100 additions and 37 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import verifyUser from "@/lib/api/verifyUser";
export default async function users(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "POST") {
const response = await postUser(req, res);
return response;
return res.status(response.status).json({ response: response.response });
} else if (req.method === "GET") {
const user = await verifyUser({ req, res });
if (!user || process.env.ADMINISTRATOR !== user.username)