(&self, request: Request<Post>)
| 58 | } |
| 59 | |
| 60 | async fn add_post(&self, request: Request<Post>) -> Result<Response<PostId>, Status> { |
| 61 | let conn = &self.connection; |
| 62 | |
| 63 | let input = request.into_inner().into_model(); |
| 64 | |
| 65 | let inserted = Mutation::create_post(conn, input) |
| 66 | .await |
| 67 | .expect("could not insert post"); |
| 68 | |
| 69 | let response = PostId { |
| 70 | id: inserted.id.unwrap(), |
| 71 | }; |
| 72 | |
| 73 | Ok(Response::new(response)) |
| 74 | } |
| 75 | |
| 76 | async fn update_post(&self, request: Request<Post>) -> Result<Response<ProcessStatus>, Status> { |
| 77 | let conn = &self.connection; |
nothing calls this directly
no test coverage detected