Skip to content

Commit

Permalink
Merge pull request #55 from websitesieutoc/make-webhook
Browse files Browse the repository at this point in the history
Make webhook
  • Loading branch information
sangdth authored Oct 24, 2023
2 parents ac7c87a + c662dea commit 14cb5a3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
10 changes: 10 additions & 0 deletions app/app/(dashboard)/sites/[id]/webhook/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NextRequest, NextResponse } from 'next/server';

export async function POST(req: NextRequest) {
const { content } = await req.json();
console.log('### content: ', { content });

return new NextResponse('Received', {
status: 200,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Warnings:
- You are about to drop the column `font` on the `Site` table. All the data in the column will be lost.
- You are about to drop the column `image` on the `Site` table. All the data in the column will be lost.
- You are about to drop the column `imageBlurhash` on the `Site` table. All the data in the column will be lost.
- You are about to drop the column `logo` on the `Site` table. All the data in the column will be lost.
- You are about to drop the column `message404` on the `Site` table. All the data in the column will be lost.
- You are about to drop the `Example` table. If the table is not empty, all the data it contains will be lost.
*/
-- AlterTable
ALTER TABLE "Site" DROP COLUMN "font",
DROP COLUMN "image",
DROP COLUMN "imageBlurhash",
DROP COLUMN "logo",
DROP COLUMN "message404";

-- DropTable
DROP TABLE "Example";
25 changes: 5 additions & 20 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema

datasource db {
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
shadowDatabaseUrl = env("POSTGRES_URL_NON_POOLING") // used for migrations
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}

generator client {
provider = "prisma-client-js"
provider = "prisma-client-js"
previewFeatures = ["fullTextSearch"]
}

enum UserRole {
Expand Down Expand Up @@ -79,13 +79,8 @@ model Site {
id String @id @default(uuid())
name String?
description String? @db.Text
logo String? @default("https://public.blob.vercel-storage.com/eEZHAoPTOBSYGBE3/JRajRyC-PhBHEinQkupt02jqfKacBVHLWJq7Iy.png") @db.Text
font String @default("font-cal")
image String? @default("https://public.blob.vercel-storage.com/eEZHAoPTOBSYGBE3/hxfcV5V-eInX3jbVUhjAt1suB7zB88uGd1j20b.png") @db.Text
imageBlurhash String? @default("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAhCAYAAACbffiEAAAACXBIWXMAABYlAAAWJQFJUiTwAAABfUlEQVR4nN3XyZLDIAwE0Pz/v3q3r55JDlSBplsIEI49h76k4opexCK/juP4eXjOT149f2Tf9ySPgcjCc7kdpBTgDPKByKK2bTPFEdMO0RDrusJ0wLRBGCIuelmWJAjkgPGDSIQEMBDCfA2CEPM80+Qwl0JkNxBimiaYGOTUlXYI60YoehzHJDEm7kxjV3whOQTD3AaCuhGKHoYhyb+CBMwjIAFz647kTqyapdV4enGINuDJMSScPmijSwjCaHeLcT77C7EC0C1ugaCTi2HYfAZANgj6Z9A8xY5eiYghDMNQBJNCWhASot0jGsSCUiHWZcSGQjaWWCDaGMOWnsCcn2QhVkRuxqqNxMSdUSElCDbp1hbNOsa6Ugxh7xXauF4DyM1m5BLtCylBXgaxvPXVwEoOBjeIFVODtW74oj1yBQah3E8tyz3SkpolKS9Geo9YMD1QJR1Go4oJkgO1pgbNZq0AOUPChyjvh7vlXaQa+X1UXwKxgHokB2XPxbX+AnijwIU4ahazAAAAAElFTkSuQmCC") @db.Text
subdomain String? @unique
customDomain String? @unique
message404 String? @default("Blimey! You've found a page that doesn't exist.") @db.Text
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
environmentVariables Json @default("{}")
Expand All @@ -94,13 +89,3 @@ model Site {
@@index([userId])
}

model Example {
id Int @id @default(autoincrement())
name String?
description String? @db.Text
domainCount Int?
url String?
image String? @db.Text
imageBlurhash String? @db.Text
}

0 comments on commit 14cb5a3

Please sign in to comment.