MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / delete_post

Method delete_post

examples/tonic_example/api/src/lib.rs:86–97  ·  view source on GitHub ↗
(
        &self,
        request: Request<PostId>,
    )

Source from the content-addressed store, hash-verified

84 }
85
86 async fn delete_post(
87 &self,
88 request: Request<PostId>,
89 ) -> Result<Response<ProcessStatus>, Status> {
90 let conn = &self.connection;
91 let id = request.into_inner().id;
92
93 match Mutation::delete_post(conn, id).await {
94 Ok(_) => Ok(Response::new(ProcessStatus { success: true })),
95 Err(_) => Ok(Response::new(ProcessStatus { success: false })),
96 }
97 }
98
99 async fn get_post_by_id(&self, request: Request<PostId>) -> Result<Response<Post>, Status> {
100 let conn = &self.connection;

Callers

nothing calls this directly

Calls 3

delete_postFunction · 0.85
into_innerMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected