Skip to content

Commit

Permalink
refactor(envited.ascs.digital): misc
Browse files Browse the repository at this point in the history
Signed-off-by: Roy Scheeren <[email protected]>
  • Loading branch information
royscheeren committed Jan 25, 2024
1 parent 367a789 commit 3144ed6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions apps/envited.ascs.digital/common/auth/session.ts
Original file line number Diff line number Diff line change
@@ -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<Session | null>) => (authOptions: NextAuthOptions) => () =>
NAGetServerSession(authOptions)
export const _getServerSession =
(NAGetServerSession: (arg0: NextAuthOptions) => Promise<Session | null>) => (authOptions: NextAuthOptions) => () =>
NAGetServerSession(authOptions)

export const getServerSession = _getServerSession(NAGetServerSession)(authOptions)
2 changes: 1 addition & 1 deletion apps/envited.ascs.digital/common/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Session | null> }) =>
Expand Down

0 comments on commit 3144ed6

Please sign in to comment.