14 lines
241 B
TypeScript
14 lines
241 B
TypeScript
import { auth } from '@/config/auth'
|
|
|
|
export const currentUser = async () => {
|
|
const session = await auth()
|
|
|
|
return session?.user
|
|
}
|
|
|
|
export const currentRole = async () => {
|
|
const session = await auth()
|
|
|
|
return session?.user?.role
|
|
}
|