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

Method update_post

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

Source from the content-addressed store, hash-verified

74 }
75
76 async fn update_post(&self, request: Request<Post>) -> Result<Response<ProcessStatus>, Status> {
77 let conn = &self.connection;
78 let input = request.into_inner().into_model();
79
80 match Mutation::update_post_by_id(conn, input.id, input).await {
81 Ok(_) => Ok(Response::new(ProcessStatus { success: true })),
82 Err(_) => Ok(Response::new(ProcessStatus { success: false })),
83 }
84 }
85
86 async fn delete_post(
87 &self,

Callers

nothing calls this directly

Calls 3

into_innerMethod · 0.80
newFunction · 0.50
into_modelMethod · 0.45

Tested by

no test coverage detected