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

Function new

examples/salvo_example/api/src/lib.rs:72–82  ·  view source on GitHub ↗
(depot: &mut Depot)

Source from the content-addressed store, hash-verified

70
71#[handler]
72async fn new(depot: &mut Depot) -> Result<Text<String>> {
73 let state = depot
74 .obtain::<AppState>()
75 .ok_or_else(StatusError::internal_server_error)?;
76 let ctx = tera::Context::new();
77 let body = state
78 .templates
79 .render("new.html.tera", &ctx)
80 .map_err(|_| StatusError::internal_server_error())?;
81 Ok(Text::Html(body))
82}
83
84#[handler]
85async fn edit(req: &mut Request, depot: &mut Depot) -> Result<Text<String>> {

Callers 7

listFunction · 0.70
editFunction · 0.70
mainFunction · 0.70
graphql_playgroundFunction · 0.50
mainFunction · 0.50
schemaFunction · 0.50
prepare_mock_dbFunction · 0.50

Calls

no outgoing calls

Tested by 1

prepare_mock_dbFunction · 0.40