@@ -47,22 +47,22 @@ app.get("/email", async (req, res) => {
4747 } ) ;
4848} ) ;
4949
50-
51-
5250app . get ( "/openai" , async ( req , res ) => {
53-
54- const { recipe_country_of_origin, is_lactose_intolerant, is_vegan, what_are_user_other_dietary_requirements } = req . query
51+ const {
52+ recipe_country_of_origin,
53+ is_lactose_intolerant,
54+ is_vegan,
55+ what_are_user_other_dietary_requirements,
56+ } = req . query ;
5557 try {
5658 console . log (
5759 { recipe_country_of_origin } ,
5860 { is_lactose_intolerant } ,
5961 { is_vegan } ,
60- { what_are_user_other_dietary_requirements}
62+ { what_are_user_other_dietary_requirements }
6163 ) ;
6264
63- const prompt = `Provide a recipe for a dish from ${
64- recipe_country_of_origin
65- } , taking into account the fact that I'm ${
65+ const prompt = `Provide a recipe for a dish from ${ recipe_country_of_origin } , taking into account the fact that I'm ${
6666 is_lactose_intolerant === "true"
6767 ? "lactose intolerant"
6868 : "not lactose intolerant"
@@ -105,14 +105,11 @@ app.get("/openai", async (req, res) => {
105105// const dishCountry = req.body.recipe_country_of_origin;
106106// const isUserLactoseIntolerant = req.body.is_lactose_intolerant;
107107
108-
109108// res.json({
110109// message: `Variables ${dishCountry} and ${isUserLactoseIntolerant} received successfully`,
111110// });
112111// });
113112
114-
115-
116113app . use ( express . static ( "public" ) ) ;
117114const port = process . env . PORT || 3000 ;
118115app . listen ( port , ( ) => {
0 commit comments