From 3144ed68eade7618dc3d93db3b16db47788084d4 Mon Sep 17 00:00:00 2001 From: Roy Scheeren Date: Thu, 25 Jan 2024 12:46:05 +0100 Subject: [PATCH] refactor(envited.ascs.digital): misc Signed-off-by: Roy Scheeren --- apps/envited.ascs.digital/common/auth/session.ts | 7 ++++--- apps/envited.ascs.digital/common/server/server.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/envited.ascs.digital/common/auth/session.ts b/apps/envited.ascs.digital/common/auth/session.ts index 2e44d906..1b75617a 100644 --- a/apps/envited.ascs.digital/common/auth/session.ts +++ b/apps/envited.ascs.digital/common/auth/session.ts @@ -1,9 +1,10 @@ import { getServerSession as NAGetServerSession, NextAuthOptions } from 'next-auth' -import { authOptions } from './auth' import { Session } from '../types/types' +import { authOptions } from './auth' -export const _getServerSession = (NAGetServerSession: (arg0: NextAuthOptions) => Promise) => (authOptions: NextAuthOptions) => () => - NAGetServerSession(authOptions) +export const _getServerSession = + (NAGetServerSession: (arg0: NextAuthOptions) => Promise) => (authOptions: NextAuthOptions) => () => + NAGetServerSession(authOptions) export const getServerSession = _getServerSession(NAGetServerSession)(authOptions) diff --git a/apps/envited.ascs.digital/common/server/server.ts b/apps/envited.ascs.digital/common/server/server.ts index 58f647b9..79e8acc4 100644 --- a/apps/envited.ascs.digital/common/server/server.ts +++ b/apps/envited.ascs.digital/common/server/server.ts @@ -5,8 +5,8 @@ import { getServerSession } from '../auth' import { db } from '../database/queries' import { Database } from '../database/types' import { User } from '../types' -import { badRequestError, error, unauthorizedError } from '../utils' import { Session } from '../types/types' +import { badRequestError, error, unauthorizedError } from '../utils' export const _getUserById = ({ db, getServerSession }: { db: Database; getServerSession: () => Promise }) =>