mirror of
https://github.com/LukeHagar/baton.git
synced 2025-12-09 20:37:46 +00:00
25 lines
537 B
TypeScript
25 lines
537 B
TypeScript
import { PrismaClient } from '@prisma/client'
|
|
|
|
const prisma = new PrismaClient()
|
|
|
|
async function main() {
|
|
const user = await prisma.webhook.create({
|
|
data: {
|
|
headers: '{"Content-Type":"application/json"}',
|
|
method: 'POST',
|
|
path: '/',
|
|
body: '{"message":"Hello, world!"}'
|
|
}
|
|
})
|
|
console.log(user)
|
|
}
|
|
|
|
main()
|
|
.then(async () => {
|
|
await prisma.$disconnect()
|
|
})
|
|
.catch(async (e) => {
|
|
console.error(e)
|
|
await prisma.$disconnect()
|
|
process.exit(1)
|
|
}) |