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

Function new

examples/actix_example/api/src/lib.rs:65–72  ·  view source on GitHub ↗
(data: web::Data<AppState>)

Source from the content-addressed store, hash-verified

63
64#[get("/new")]
65async fn new(data: web::Data<AppState>) -> Result<HttpResponse, Error> {
66 let template = &data.templates;
67 let ctx = tera::Context::new();
68 let body = template
69 .render("new.html.tera", &ctx)
70 .map_err(|_| error::ErrorInternalServerError("Template error"))?;
71 Ok(HttpResponse::Ok().content_type("text/html").body(body))
72}
73
74#[post("/")]
75async fn create(

Callers 11

listFunction · 0.70
editFunction · 0.70
not_foundFunction · 0.70
startFunction · 0.70
prepare_mock_dbFunction · 0.50
startFunction · 0.50
list_postsFunction · 0.50
new_postFunction · 0.50
edit_postFunction · 0.50
post_responseFunction · 0.50
prepare_mock_dbFunction · 0.50

Calls

no outgoing calls

Tested by 2

prepare_mock_dbFunction · 0.40
prepare_mock_dbFunction · 0.40