catgirl-cooking/src/networking.rs

13 lines
273 B
Rust
Raw Normal View History

2022-01-24 02:07:35 +00:00
use rocket::form::Form;
use crate::structures::RecipeForm;
#[get("/test")]
pub fn test() -> String {
return "Hello! :3".to_string();
}
#[post("/new-recipe", data = "<recipe>")]
pub fn new_recipe(recipe: Form<RecipeForm>) -> String {
return recipe.name.clone();
}