diff --git a/app/(customer)/dashboard/(admin)/admin/settings/page.tsx b/app/(customer)/dashboard/(admin)/admin/settings/page.tsx
index 13338cbd..cc30757e 100644
--- a/app/(customer)/dashboard/(admin)/admin/settings/page.tsx
+++ b/app/(customer)/dashboard/(admin)/admin/settings/page.tsx
@@ -1,9 +1,7 @@
import {PageParams} from "@/types/next";
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {db} from "@/db";
-import { logger } from "@/lib/logger";
-
-const log = logger.child({ module: "dashboard/admin/settings" });
+import {logger} from "@/lib/logger";
import {notFound} from "next/navigation";
import {SettingsTabs} from "@/components/wrappers/dashboard/admin/settings/settings-tabs";
import {desc, isNull} from "drizzle-orm";
@@ -11,13 +9,15 @@ import * as drizzleDb from "@/db";
import {StorageChannelWith} from "@/db/schema/12_storage-channel";
import {NotificationChannelWith} from "@/db/schema/09_notification-channel";
+const log = logger.child({module: "dashboard/admin/settings"});
+
export default async function RoutePage(props: PageParams<{}>) {
const settings = await db.query.setting.findFirst({
where: (fields, {eq}) => eq(fields.name, "system"),
});
- log.debug({ settings }, "Settings loaded");
+ log.debug({settings}, "Settings loaded");
const storageChannels = await db.query.storageChannel.findMany({
with: {
@@ -36,7 +36,7 @@ export default async function RoutePage(props: PageParams<{}>) {
}) as NotificationChannelWith[]
- if (!settings || !storageChannels || !notificationChannels ) {
+ if (!settings || !storageChannels || !notificationChannels) {
notFound()
}
@@ -48,7 +48,8 @@ export default async function RoutePage(props: PageParams<{}>) {
-
+
);
diff --git a/src/components/wrappers/dashboard/projects/button-delete-project/delete-project.action.ts b/src/components/wrappers/dashboard/projects/button-delete-project/delete-project.action.ts
index de3c6913..81674c0f 100644
--- a/src/components/wrappers/dashboard/projects/button-delete-project/delete-project.action.ts
+++ b/src/components/wrappers/dashboard/projects/button-delete-project/delete-project.action.ts
@@ -2,15 +2,15 @@
import {userAction} from "@/lib/safe-actions/actions";
import { logger } from "@/lib/logger";
-
-const log = logger.child({ module: "dashboard/delete-project.action" });
import {z} from "zod";
import {v4 as uuidv4} from "uuid";
import {ServerActionResult} from "@/types/action-type";
-import {and, eq, inArray} from "drizzle-orm";
+import {eq, inArray} from "drizzle-orm";
import {db} from "@/db";
import * as drizzleDb from "@/db";
+const log = logger.child({ module: "dashboard/delete-project.action" });
+
export const deleteProjectAction = userAction.schema(z.string()).action(async ({parsedInput}): Promise> => {
try {
const uuid = uuidv4();
diff --git a/src/features/upload/public/upload.action.ts b/src/features/upload/public/upload.action.ts
index 2b107419..e41b1d7a 100644
--- a/src/features/upload/public/upload.action.ts
+++ b/src/features/upload/public/upload.action.ts
@@ -1,8 +1,6 @@
"use server";
import {userAction} from "@/lib/safe-actions/actions";
-import { logger } from "@/lib/logger";
-
-const log = logger.child({ module: "features/upload/upload.action" });
+import {logger} from "@/lib/logger";
import {z} from "zod";
import {v4 as uuidv4} from "uuid";
import {db} from "@/db";
@@ -13,6 +11,7 @@ import {dispatchStorage} from "@/features/storages/dispatch";
import {StorageInput} from "@/features/storages/types";
import sharp from "sharp";
+const log = logger.child({module: "features/upload/upload.action"});
export const uploadUserImageAction = userAction.schema(
z.instanceof(FormData)
@@ -30,7 +29,7 @@ export const uploadUserImageAction = userAction.schema(
const isWebp = fileFormat === "webp";
const compressedBuffer = await sharp(buffer)
- .resize({ width: 1024 })
+ .resize({width: 1024})
.toFormat(isPng ? "png" : isWebp ? "webp" : "jpeg", {
quality: 80,
compressionLevel: isPng ? 9 : undefined
@@ -38,7 +37,6 @@ export const uploadUserImageAction = userAction.schema(
.toBuffer();
-
const settings = await db.query.setting.findFirst({
where: eq(drizzleDb.schemas.setting.name, "system"),
with: {
@@ -72,7 +70,7 @@ export const uploadUserImageAction = userAction.schema(
}
const result = await dispatchStorage(input, undefined, settings.storageChannel.id);
- log.debug({ result }, "Upload dispatch result");
+ log.debug({result}, "Upload dispatch result");
if (!result.success) {
return {
success: false,
diff --git a/src/utils/init.ts b/src/utils/init.ts
index 23225cd8..d3bc859e 100644
--- a/src/utils/init.ts
+++ b/src/utils/init.ts
@@ -132,7 +132,7 @@ async function createDefaultOrganization() {
}
function consoleAscii() {
- log.info(
+ console.log(
" \n" +
" ____ __ __ \n" +
" / __ \\____ _____/ /_____ _/ /_ ____ _________ \n" +