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, - }; -});