Adds basic vuejs functionnality, implements RecipeCategory custom field

This commit is contained in:
2019-02-01 15:58:58 +01:00
parent 66514eb192
commit 616f8095e2
5 changed files with 112 additions and 14 deletions

View File

@@ -4,11 +4,12 @@ extern crate diesel;
use std::io::{Read, stdin};
use diesel::SqliteConnection;
use self::cookbook::*;
use self::models::NewRecipe;
use self::models::{NewRecipe, fields::RecipeCategory};
struct CreateRecipe<'a> {
connection: &'a SqliteConnection,
title: &'a str,
category: Option<RecipeCategory>,
ingredients: String,
}
@@ -17,6 +18,7 @@ impl<'a> CreateRecipe<'a> {
CreateRecipe{
connection: conn,
title: "New recipe",
category: None,
ingredients: String::new(),
}
}