From 4720202d8ac63820b6197af0bbf6c7989c30a1d4 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Wed, 14 Jun 2023 13:47:21 +0200 Subject: [PATCH] remove playground junk --- components/navigation/navigation.vue | 12 --- components/test.vue | 11 --- pages/clients.backup.vue | 124 --------------------------- pages/forms.vue | 28 ------ pages/index.vue | 26 +----- pages/tableExample.vue | 50 ----------- server/api/dbtest.get.ts | 9 -- server/api/dbtest.post.ts | 26 ------ 8 files changed, 4 insertions(+), 282 deletions(-) delete mode 100644 components/test.vue delete mode 100644 pages/clients.backup.vue delete mode 100644 pages/forms.vue delete mode 100644 pages/tableExample.vue delete mode 100644 server/api/dbtest.get.ts delete mode 100644 server/api/dbtest.post.ts diff --git a/components/navigation/navigation.vue b/components/navigation/navigation.vue index c72c67d..6e5a674 100644 --- a/components/navigation/navigation.vue +++ b/components/navigation/navigation.vue @@ -13,22 +13,10 @@ const navOpen = ref(!mobile.value); Database Project - - - - - - - diff --git a/components/test.vue b/components/test.vue deleted file mode 100644 index 6c5504e..0000000 --- a/components/test.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/pages/clients.backup.vue b/pages/clients.backup.vue deleted file mode 100644 index 5b4121b..0000000 --- a/pages/clients.backup.vue +++ /dev/null @@ -1,124 +0,0 @@ - - - - - diff --git a/pages/forms.vue b/pages/forms.vue deleted file mode 100644 index 9d5a687..0000000 --- a/pages/forms.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/pages/index.vue b/pages/index.vue index 4fba044..1887815 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,23 +1,5 @@ - - - - - diff --git a/pages/tableExample.vue b/pages/tableExample.vue deleted file mode 100644 index 751b9bb..0000000 --- a/pages/tableExample.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/server/api/dbtest.get.ts b/server/api/dbtest.get.ts deleted file mode 100644 index e801627..0000000 --- a/server/api/dbtest.get.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* global defineEventHandler */ - -import { database } from "../utils/database"; - -export default defineEventHandler(async () => { - const [owo] = await database.execute("SELECT * FROM `sch_baza_smartfony`.`lombardy`"); - - return owo as {id: number, nazwa: string, adres: string, kontakt: string}[]; -}); diff --git a/server/api/dbtest.post.ts b/server/api/dbtest.post.ts deleted file mode 100644 index d13e2ab..0000000 --- a/server/api/dbtest.post.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* global defineEventHandler, readBody */ - -import { RowDataPacket } from "mysql2"; - -import { database } from "../utils/database"; -import { isString } from "../utils/isString"; - -export default defineEventHandler(async (e) => { - const data = await readBody(e); - - const nazwa = data.nazwa; - const adres = data.adres; - const kontakt = data.kontakt; - - if (!isString(nazwa)) throw new Error("nazwa is not string"); - if (!isString(adres)) throw new Error("adres is not string"); - if (!isString(kontakt)) throw new Error("kontakt is not string"); - - const [inserted] = await database.query("INSERT INTO `sch_baza_smartfony`.`lombardy` (`nazwa`, `adres`, `kontakt`) VALUES (?, ?, ?);", [nazwa, adres, kontakt]) as RowDataPacket[]; - return { - id: inserted.insertId as number, - nazwa, - adres, - kontakt, - }; -});