Merge branch 'main' of https://github.com/GamerBoss101/VTHacks-12
This commit is contained in:
@@ -47,6 +47,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mx-auto">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body mx-auto">
|
||||||
|
<h4 class="card-title" style="text-align: center;">Select Dietary Restriction</h4>
|
||||||
|
<div class="btn-group" role="group"><button class="btn btn-primary" type="button">Vegetarian</button><button class="btn btn-primary" type="button">Vegan</button><button class="btn btn-primary" type="button">Gluten-free</button><button class="btn btn-primary" type="button">Lactose-free</button><button class="btn btn-primary" type="button">Nut-free</button></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mx-auto">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body mx-auto">
|
||||||
|
<div class="btn-group" role="group" style="width: 719.555;"><button class="btn btn-primary" type="button">Halal</button><button class="btn btn-primary" type="button">Kosher</button><button class="btn btn-primary" type="button">Keto</button><button class="btn btn-primary" type="button">Diabetic</button><button class="btn btn-primary" type="button">Pescatarian</button></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ class aiClass{
|
|||||||
messages: [{ role: 'user', content:
|
messages: [{ role: 'user', content:
|
||||||
`Give one food suggestion this question answers.
|
`Give one food suggestion this question answers.
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
|
|||||||
35
server/api/recipes.js
Normal file
35
server/api/recipes.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import APIRoute from "../APIRoute.js";
|
||||||
|
|
||||||
|
export default class UsersAPI extends APIRoute {
|
||||||
|
constructor() {
|
||||||
|
super('/recipes');
|
||||||
|
|
||||||
|
this.addSubRoute('/create', 'post', createRecipe);
|
||||||
|
}
|
||||||
|
|
||||||
|
async get(req, res) {
|
||||||
|
res.send('GET request');
|
||||||
|
}
|
||||||
|
|
||||||
|
async post(req, res) {
|
||||||
|
res.send('POST request');
|
||||||
|
}
|
||||||
|
|
||||||
|
async createRecipe(req, res) {
|
||||||
|
let recipe = req.body;
|
||||||
|
|
||||||
|
let db = req.app.get('mongo').recipes;
|
||||||
|
|
||||||
|
let result = await db.create({
|
||||||
|
userID: recipe.userID,
|
||||||
|
ingredients: recipe.ingredients,
|
||||||
|
productName: recipe.productName,
|
||||||
|
nutritionFacts: recipe.nutritionFacts,
|
||||||
|
rating: recipe.rating,
|
||||||
|
cuisine: recipe.cuisine,
|
||||||
|
expense: recipe.expense,
|
||||||
|
mealType: recipe.mealType
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user