From 29129ed4d7181db637f1f5e947688a2a2e734a7f Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Tue, 31 May 2022 11:15:51 +0200 Subject: [PATCH] new port --- client/components/CookbookForm.js | 34 +++++++++++++++++++++++++------ cookbook.py | 4 ++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/client/components/CookbookForm.js b/client/components/CookbookForm.js index 4d72002..85aae9a 100644 --- a/client/components/CookbookForm.js +++ b/client/components/CookbookForm.js @@ -3,13 +3,31 @@ export default { setup() { const { ref } = Vue; - const title = ref(""); - const description = ref(""); - const nature = ref(""); - const logs = ref([""]); - const who = ref(""); + const title = ref("SI18.5 - Diffractive Cookbook"); + const description = ref("Compiling and sharing methods for diffractive reading."); + const nature = ref("Methods"); + const logs = ref([ + "Do the assignment proposed by Femke", + "While doing the assignment, make sure to track your method with the help of the following form", + "This method will be used by others and applied on different resources", + ]); + const who = ref("Grr, Kamo, Kimberley"); - return { title, description, nature, logs, who }; + const submit = function () { + fetch("http://127.0.0.1:5000/soupboat/coockbook/", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ + title: title.value, + description: description.value, + nature: nature.value, + logs: logs.value, + who: who.value, + }), + }); + }; + + return { title, description, nature, logs, who, submit }; }, template: `
@@ -38,6 +56,10 @@ export default { + +
+ +