(&self, p: post::Model)
| 58 | } |
| 59 | |
| 60 | async fn insert(&self, p: post::Model) -> RpcResult<i32> { |
| 61 | let new_post = Mutation::create_post(&self.conn, p) |
| 62 | .await |
| 63 | .internal_call_error()?; |
| 64 | |
| 65 | Ok(new_post.id.unwrap()) |
| 66 | } |
| 67 | |
| 68 | async fn update(&self, p: post::Model) -> RpcResult<bool> { |
| 69 | Mutation::update_post_by_id(&self.conn, p.id, p) |
no test coverage detected