(conn: Connection<Db>, id: i32)
| 110 | #[openapi(tag = "POST")] |
| 111 | #[get("/<id>")] |
| 112 | async fn get_by_id(conn: Connection<Db>, id: i32) -> R<Option<post::Model>> { |
| 113 | let db = conn.into_inner(); |
| 114 | |
| 115 | let post: Option<post::Model> = Query::find_post_by_id(&db, id) |
| 116 | .await |
| 117 | .expect("could not find post"); |
| 118 | Ok(Json(post)) |
| 119 | } |
| 120 | |
| 121 | /// # delete post by Id |
| 122 | #[openapi(tag = "POST")] |
nothing calls this directly
no test coverage detected