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

Function create

examples/poem_example/api/src/lib.rs:33–42  ·  view source on GitHub ↗
(state: Data<&AppState>, form: Form<post::Model>)

Source from the content-addressed store, hash-verified

31
32#[handler]
33async fn create(state: Data<&AppState>, form: Form<post::Model>) -> Result<impl IntoResponse> {
34 let form = form.0;
35 let conn = &state.conn;
36
37 MutationCore::create_post(conn, form)
38 .await
39 .map_err(InternalServerError)?;
40
41 Ok(StatusCode::FOUND.with_header("location", "/"))
42}
43
44#[handler]
45async fn list(state: Data<&AppState>, Query(params): Query<Params>) -> Result<impl IntoResponse> {

Callers 15

create_new_migrationFunction · 0.50
update_migratorFunction · 0.50
run_generate_commandFunction · 0.50
upMethod · 0.50
create_index_from_entityFunction · 0.50
create_table_from_entityFunction · 0.50
get_indexes_stmtFunction · 0.50
setup_schemaFunction · 0.50
create_bakery_tableFunction · 0.50

Calls 1

create_postFunction · 0.85

Tested by 4

upMethod · 0.40
upMethod · 0.40
upMethod · 0.40