Replace mysql2 with prisma

also I updated packages,
and properly typed api input
a lot of time was spent, I don't remeber what really I did x3
but everything was related to replacing mysql2 with prisma
This commit is contained in:
Wroclaw 2023-11-08 05:35:48 +01:00
parent be1e3909b6
commit eebf25198d
39 changed files with 1081 additions and 1292 deletions

View file

@ -4,7 +4,6 @@ import { type NuxtError } from "nuxt/app";
import { ref, type Ref, reactive } from "vue";
import { VBtn } from "vuetify/components";
import { type client as clientType } from "~/utils/types/database";
import pagedTable from "~/components/pagedTable.vue";
import Alerts, { type AlertData } from "~/components/alerts.vue";
import { type fieldDefinition } from "~/components/entryEditor.vue";
@ -33,7 +32,7 @@ async function rowClicked(client: string, edit = false) {
async function rowDelete(client: string) {
try {
await $fetch<clientType>(`/api/clients/${client}`, {
await $fetch(`/api/clients/${client}` as "api/clients/:id", {
method: "DELETE",
});
clients.value = clients.value.filter(e => e.id !== client);