From a03f1dc2ac25579df30e8cb59d2703110c3e564d Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 13 Mar 2024 22:37:41 +0000 Subject: lint: Lint and format the entire repo with the new configs --- apps/web/server/api/client.ts | 5 +++-- apps/web/server/auth.ts | 17 ++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'apps/web/server') diff --git a/apps/web/server/api/client.ts b/apps/web/server/api/client.ts index 88ea7a0e..8b414d39 100644 --- a/apps/web/server/api/client.ts +++ b/apps/web/server/api/client.ts @@ -1,7 +1,8 @@ -import { appRouter } from "@hoarder/trpc/routers/_app"; import { getServerAuthSession } from "@/server/auth"; -import { Context, createCallerFactory } from "@hoarder/trpc"; + import { db } from "@hoarder/db"; +import { Context, createCallerFactory } from "@hoarder/trpc"; +import { appRouter } from "@hoarder/trpc/routers/_app"; export const createContext = async (database?: typeof db): Promise => { const session = await getServerAuthSession(); diff --git a/apps/web/server/auth.ts b/apps/web/server/auth.ts index 950443b9..767bc7e8 100644 --- a/apps/web/server/auth.ts +++ b/apps/web/server/auth.ts @@ -1,15 +1,18 @@ -import NextAuth, { NextAuthOptions, getServerSession } from "next-auth"; import type { Adapter } from "next-auth/adapters"; +import { DrizzleAdapter } from "@auth/drizzle-adapter"; +import NextAuth, { + DefaultSession, + getServerSession, + NextAuthOptions, +} from "next-auth"; import AuthentikProvider from "next-auth/providers/authentik"; -import serverConfig from "@hoarder/shared/config"; -import { validatePassword } from "@hoarder/trpc/auth"; -import { db } from "@hoarder/db"; -import { DefaultSession } from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; -import { DrizzleAdapter } from "@auth/drizzle-adapter"; - import { Provider } from "next-auth/providers/index"; +import { db } from "@hoarder/db"; +import serverConfig from "@hoarder/shared/config"; +import { validatePassword } from "@hoarder/trpc/auth"; + declare module "next-auth/jwt" { export interface JWT { user: { -- cgit v1.2.3-70-g09d2