Migration to nuxt 4
Used codemods CLI and reworked most alias'd path that stopped working
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { Calendar } from "~/models/CalendarConfig"
|
||||
import type { Calendar } from "@@/models/CalendarConfig"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { Calendar} from "~/models/CalendarConfig";
|
||||
import { postCalendarSchema } from "~/models/CalendarConfig"
|
||||
import type { Calendar} from "@@/models/CalendarConfig";
|
||||
import { postCalendarSchema } from "@@/models/CalendarConfig"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { Category } from "~/models/Category"
|
||||
import type { Category } from "@@/models/Category"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { Category} from "~/models/Category";
|
||||
import { categorySchema } from "~/models/Category"
|
||||
import type { Category} from "@@/models/Category";
|
||||
import { categorySchema } from "@@/models/Category"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { type Category, categorySchema } from "@/models/Category";
|
||||
import { type Category, categorySchema } from "@@/models/Category";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const client = await serverSupabaseClient(event)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { z } from "zod"
|
||||
import type { Category } from "~/models/Category";
|
||||
import type { Category } from "@@/models/Category";
|
||||
|
||||
const querySchema = z.object({
|
||||
id: z.coerce.number().positive().int().optional(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import type { Calendar} from "~/models/CalendarConfig";
|
||||
import { postCalendarSchema } from "~/models/CalendarConfig";
|
||||
import type { Calendar} from "@@/models/CalendarConfig";
|
||||
import { postCalendarSchema } from "@@/models/CalendarConfig";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const client = await serverSupabaseClient(event)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { CalendarEvent } from "~/models/CalendarEvent"
|
||||
import type { CalendarEvent } from "@@/models/CalendarEvent"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import { postEventBodySchema, type CalendarEvent } from "~/models/CalendarEvent"
|
||||
import { postEventBodySchema, type CalendarEvent } from "@@/models/CalendarEvent"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import type { CalendarEvent } from "@/models/CalendarEvent";
|
||||
import { postEventBodySchema } from "@/models/CalendarEvent";
|
||||
import type { CalendarEvent } from "@@/models/CalendarEvent";
|
||||
import { postEventBodySchema } from "@@/models/CalendarEvent";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const client = await serverSupabaseClient(event)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { z } from "zod"
|
||||
import type { CalendarEvent } from "~/models/CalendarEvent";
|
||||
import type { CalendarEvent } from "@@/models/CalendarEvent";
|
||||
|
||||
const querySchema = z.object({
|
||||
calendarId: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { CalendarMonth } from "~/models/CalendarMonth"
|
||||
import type { CalendarMonth } from "@@/models/CalendarMonth"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import { calendarMonthSchema, type CalendarMonth } from "~/models/CalendarMonth"
|
||||
import { calendarMonthSchema, type CalendarMonth } from "@@/models/CalendarMonth"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { calendarMonthSchema, type CalendarMonth } from "~/models/CalendarMonth"
|
||||
import { calendarMonthSchema, type CalendarMonth } from "@@/models/CalendarMonth"
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const client = await serverSupabaseClient(event)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { z } from "zod"
|
||||
import type { CalendarMonth } from "~/models/CalendarMonth";
|
||||
import type { CalendarMonth } from "@@/models/CalendarMonth";
|
||||
|
||||
const querySchema = z.object({
|
||||
calendarId: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import { z } from "zod"
|
||||
import type { Calendar } from "~/models/CalendarConfig";
|
||||
import type { Calendar } from "@@/models/CalendarConfig";
|
||||
|
||||
const querySchema = z.object({
|
||||
id: z.coerce.number().positive().int().optional(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import type { Character } from "~/models/Characters";
|
||||
import type { Character } from "@@/models/Characters";
|
||||
|
||||
const querySchema = z.object({
|
||||
worldId: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import type { World } from "~/models/World"
|
||||
import type { World } from "@@/models/World"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server"
|
||||
import { postWorldSchema, type World } from "~/models/World"
|
||||
import { postWorldSchema, type World } from "@@/models/World"
|
||||
|
||||
const paramsSchema = z.object({
|
||||
id: z.coerce.number().positive().int()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import type { World } from "~/models/World";
|
||||
import { postWorldSchema } from "~/models/World";
|
||||
import type { World } from "@@/models/World";
|
||||
import { postWorldSchema } from "@@/models/World";
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const client = await serverSupabaseClient(event)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod"
|
||||
import { serverSupabaseClient } from "#supabase/server";
|
||||
import type { World } from "~/models/World";
|
||||
import type { World } from "@@/models/World";
|
||||
|
||||
const querySchema = z.object({
|
||||
id: z.coerce.number().positive().int().optional(),
|
||||
|
||||
Reference in New Issue
Block a user