Adds basic vuejs functionnality, implements RecipeCategory custom field
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user