(
&self,
request: Request<PostId>,
)
| 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; |
nothing calls this directly
no test coverage detected