diff --git a/README.md b/README.md index ffcee64..a12f842 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ - [ ] Add user profile and settings (i.e. language) - [ ] Add user roles - [ ] Add user permissions +- [ ] Add module CRUD with protected routes +- [ ] Customize Auth0 login page - [ ] Add user notifications and emails - [ ] Add user invoices - [ ] Add cron jobs to import data diff --git a/app/api/signup/route.ts b/app/api/signup/route.ts deleted file mode 100644 index b670c67..0000000 --- a/app/api/signup/route.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { PrismaClient } from '@prisma/client'; -import type { NextApiRequest, NextApiResponse } from 'next'; - -const prisma = new PrismaClient(); - -export default async function handler( - req: NextApiRequest, - res: NextApiResponse -) { - if (req.method === 'POST') { - const { email } = req.body; - try { - const user = await prisma.user.create({ - data: { - email - } - }); - return res.status(200).json(user); - } catch (error) { - console.error('Failed to create user:', error); - return res.status(500).json({ error: 'Failed to create user' }); - } - } else { - // Handle any other HTTP method - res.setHeader('Allow', ['POST']); - res.status(405).end(`Method ${req.method} Not Allowed`); - } -} diff --git a/prisma/migrations/20240625203749_remove_user_name/migration.sql b/prisma/migrations/20240625203749_remove_user_name/migration.sql new file mode 100644 index 0000000..6832f74 --- /dev/null +++ b/prisma/migrations/20240625203749_remove_user_name/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "User" ALTER COLUMN "name" DROP NOT NULL;