catgirl-cooking/src/networking.rs

13 lines
273 B
Rust

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();
}