Removed unused imports
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { serverSupabaseClient } from "#supabase/server";
|
import { serverSupabaseClient } from "#supabase/server";
|
||||||
// import type { Calendar} from "~/models/CalendarConfig";
|
|
||||||
import type { Calendar} from "~/models/CalendarConfig";
|
import type { Calendar} from "~/models/CalendarConfig";
|
||||||
import { postCalendarSchema } from "~/models/CalendarConfig";
|
import { postCalendarSchema } from "~/models/CalendarConfig";
|
||||||
|
|
||||||
@@ -63,7 +62,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
.insert(bodyData.months as never)
|
.insert(bodyData.months as never)
|
||||||
|
|
||||||
if (error) throw error
|
if (error) throw error
|
||||||
} catch (err) {
|
} catch {
|
||||||
// If we found an error, rollback the calendar
|
// If we found an error, rollback the calendar
|
||||||
if (calendarId) {
|
if (calendarId) {
|
||||||
await client
|
await client
|
||||||
@@ -89,7 +88,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
.eq("id", calendarId)
|
.eq("id", calendarId)
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.single<Calendar>()
|
.single<Calendar>()
|
||||||
} catch (err) {
|
} catch {
|
||||||
throw createError({
|
throw createError({
|
||||||
cause: "Serveur",
|
cause: "Serveur",
|
||||||
fatal: false,
|
fatal: false,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { serverSupabaseClient } from "#supabase/server";
|
import { serverSupabaseClient } from "#supabase/server";
|
||||||
// import type { Calendar} from "~/models/CalendarConfig";
|
|
||||||
import type { World } from "~/models/World";
|
import type { World } from "~/models/World";
|
||||||
import { postWorldSchema } from "~/models/World";
|
import { postWorldSchema } from "~/models/World";
|
||||||
|
|
||||||
@@ -41,7 +40,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
if (error) throw error
|
if (error) throw error
|
||||||
|
|
||||||
return data
|
return data
|
||||||
} catch (err) {
|
} catch {
|
||||||
throw createError({
|
throw createError({
|
||||||
cause: "Serveur",
|
cause: "Serveur",
|
||||||
status: 500,
|
status: 500,
|
||||||
|
|||||||
Reference in New Issue
Block a user