MCPcopy Create free account
hub / github.com/prisma/prisma-examples / deletePost

Function deletePost

orm/grpc/server/server.ts:92–104  ·  view source on GitHub ↗
(call: any, callback: any)

Source from the content-addressed store, hash-verified

90}
91
92async function deletePost(call: any, callback: any) {
93 const { id } = call.request
94 try {
95 const deletedPost = await prisma.post.delete({
96 where: {
97 id,
98 },
99 })
100 callback(null, deletedPost)
101 } catch (e) {
102 callback(e, null)
103 }
104}
105
106async function publish(call: any, callback: any) {
107 const { id } = call.request

Callers 1

PostFunction · 0.85

Calls 1

deleteMethod · 0.65

Tested by

no test coverage detected