diff --git a/app/api/unsubscribe/route.ts b/app/api/unsubscribe/route.ts index 063cd9e..6f99e35 100644 --- a/app/api/unsubscribe/route.ts +++ b/app/api/unsubscribe/route.ts @@ -17,7 +17,7 @@ export async function POST(request: NextRequest) { const body = await request.json(); const validation = UnsubscribeFormSchema.safeParse(body); - + if (!validation.success) { return formatApiResponse(STATUS_BAD_REQUEST, BAD_REQUEST); } diff --git a/prisma/migrations/20250118112529_rename_created_at_column/migration.sql b/prisma/migrations/20250118112529_rename_created_at_column/migration.sql new file mode 100644 index 0000000..50895dd --- /dev/null +++ b/prisma/migrations/20250118112529_rename_created_at_column/migration.sql @@ -0,0 +1,2 @@ +-- Rename the column without dropping it +ALTER TABLE news RENAME COLUMN created_at TO "createdAt"; \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma index fc4874e..5d23021 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -29,7 +29,7 @@ model News { time Float url String? score Float - createdAt DateTime @default(now()) @map(name: "created_at") + createdAt DateTime @default(now()) @@map(name: "news") }