From 08d8b46decb92bb3743de02386243e48588d3ca9 Mon Sep 17 00:00:00 2001 From: David Nahodyl Date: Fri, 7 Jun 2024 19:26:51 -0400 Subject: [PATCH] better examples --- playground/components/nav/NavBar.vue | 4 +- .../{todo-precog.vue => register-precog.vue} | 45 +++++++++---------- playground/pages/{todo.vue => register.vue} | 28 ++++++------ .../server/api/register-precog/index.post.ts | 30 +++++++++++++ playground/server/api/register/index.post.ts | 27 +++++++++++ .../server/api/todo-precog/index.post.ts | 25 ----------- playground/server/api/todo/index.post.ts | 24 ---------- 7 files changed, 93 insertions(+), 90 deletions(-) rename playground/pages/{todo-precog.vue => register-precog.vue} (53%) rename playground/pages/{todo.vue => register.vue} (56%) create mode 100644 playground/server/api/register-precog/index.post.ts create mode 100644 playground/server/api/register/index.post.ts delete mode 100644 playground/server/api/todo-precog/index.post.ts delete mode 100644 playground/server/api/todo/index.post.ts diff --git a/playground/components/nav/NavBar.vue b/playground/components/nav/NavBar.vue index 2367458..3a690f5 100644 --- a/playground/components/nav/NavBar.vue +++ b/playground/components/nav/NavBar.vue @@ -9,8 +9,8 @@ import ContentWidthContainer from "~/components/ContentWidthContainer.vue";
Home - Todo - Todo-Precognitive + Register + Register-Precognitive
diff --git a/playground/pages/todo-precog.vue b/playground/pages/register-precog.vue similarity index 53% rename from playground/pages/todo-precog.vue rename to playground/pages/register-precog.vue index bee478c..c79fd92 100644 --- a/playground/pages/todo-precog.vue +++ b/playground/pages/register-precog.vue @@ -5,8 +5,8 @@ const entries = ref([]); -const form = usePrecognitionForm("post", "/api/todo-precog", { - description: "", +const form = usePrecognitionForm("post", "/api/register-precog", { + email: "", age: null, }); @@ -24,29 +24,24 @@ const submitForm = async () => {
-
- -
-
- -
+ +
Submit diff --git a/playground/pages/todo.vue b/playground/pages/register.vue similarity index 56% rename from playground/pages/todo.vue rename to playground/pages/register.vue index cfe6d5a..377c9d1 100644 --- a/playground/pages/todo.vue +++ b/playground/pages/register.vue @@ -1,11 +1,12 @@