From 8555b901a505ee9a0727feb1fed43802744e417d Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:14:16 +0100 Subject: [PATCH] Fixe type errors --- apps/dispatch/next-env.d.ts | 2 +- packages/database/prisma/json/User.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dispatch/next-env.d.ts b/apps/dispatch/next-env.d.ts index c4b7818f..9edff1c7 100644 --- a/apps/dispatch/next-env.d.ts +++ b/apps/dispatch/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/packages/database/prisma/json/User.ts b/packages/database/prisma/json/User.ts index 098e3ea3..c9bc6ce4 100644 --- a/packages/database/prisma/json/User.ts +++ b/packages/database/prisma/json/User.ts @@ -39,9 +39,9 @@ export const DISCORD_ROLES = { export const getPublicUser = ( user: User, - options = { - ignorePrivacy: false, - fullLastName: false, + options?: { + ignorePrivacy?: boolean; + fullLastName?: boolean; }, ): PublicUser => { const lastName = user.lastname @@ -50,7 +50,7 @@ export const getPublicUser = ( .map((part) => `${part[0] || ""}.`) .join(" "); - if (options.fullLastName) { + if (options?.fullLastName) { return { firstname: user.firstname, lastname: user.settingsHideLastname && !options.ignorePrivacy ? "" : user.lastname, @@ -63,9 +63,9 @@ export const getPublicUser = ( return { firstname: user.firstname, - lastname: user.settingsHideLastname && !options.ignorePrivacy ? "" : lastName.trim(), // Only take the first letter of each section of the last name + lastname: user.settingsHideLastname && !options?.ignorePrivacy ? "" : lastName.trim(), // Only take the first letter of each section of the last name fullName: - `${user.firstname} ${user.settingsHideLastname && !options.ignorePrivacy ? "" : lastName}`.trim(), + `${user.firstname} ${user.settingsHideLastname && !options?.ignorePrivacy ? "" : lastName}`.trim(), publicId: user.publicId, badges: user.badges, };