diff --git a/src/lib/actions/categoryCreateUpdate.ts b/src/lib/actions/categoryCreateUpdate.ts index aebadc8..0c6759d 100644 --- a/src/lib/actions/categoryCreateUpdate.ts +++ b/src/lib/actions/categoryCreateUpdate.ts @@ -3,7 +3,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; import { categoryFormSchema } from '@/lib/form-schemas/categoryFormSchema'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function categoryCreateUpdate({ id, @@ -12,7 +12,7 @@ export default async function categoryCreateUpdate({ }: z.infer): Promise { 'use server'; - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/categoryDelete.ts b/src/lib/actions/categoryDelete.ts index ba0e9d6..0103892 100644 --- a/src/lib/actions/categoryDelete.ts +++ b/src/lib/actions/categoryDelete.ts @@ -1,7 +1,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function categoryDelete(id: number): Promise { 'use server'; @@ -14,7 +14,7 @@ export default async function categoryDelete(id: number): Promise { 'use server'; - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/entityCreateUpdate.ts b/src/lib/actions/entityCreateUpdate.ts index d8c15fe..7739a43 100644 --- a/src/lib/actions/entityCreateUpdate.ts +++ b/src/lib/actions/entityCreateUpdate.ts @@ -3,7 +3,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import { entityFormSchema } from '@/lib/form-schemas/entityFormSchema'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function entityCreateUpdate({ id, @@ -13,7 +13,7 @@ export default async function entityCreateUpdate({ }: z.infer): Promise { 'use server'; - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/entityDelete.ts b/src/lib/actions/entityDelete.ts index fccc6fd..aea38f1 100644 --- a/src/lib/actions/entityDelete.ts +++ b/src/lib/actions/entityDelete.ts @@ -1,7 +1,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function entityDelete(id: number): Promise { 'use server'; @@ -14,7 +14,7 @@ export default async function entityDelete(id: number): Promise }; } - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/generateSampleData.ts b/src/lib/actions/generateSampleData.ts index 37cc53d..a0af523 100644 --- a/src/lib/actions/generateSampleData.ts +++ b/src/lib/actions/generateSampleData.ts @@ -3,12 +3,12 @@ import type { Category, Entity } from '@prisma/client'; import { EntityType } from '@prisma/client'; import { URL_SIGN_IN } from '@/lib/constants'; import { ActionResponse } from '@/lib/types/actionResponse'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function generateSampleData(): Promise { 'use server'; - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/paymentCreateUpdate.ts b/src/lib/actions/paymentCreateUpdate.ts index 4c304a9..c28285f 100644 --- a/src/lib/actions/paymentCreateUpdate.ts +++ b/src/lib/actions/paymentCreateUpdate.ts @@ -3,7 +3,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; import { paymentFormSchema } from '@/lib/form-schemas/paymentFormSchema'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function paymentCreateUpdate({ id, @@ -16,7 +16,7 @@ export default async function paymentCreateUpdate({ }: z.infer): Promise { 'use server'; - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error', diff --git a/src/lib/actions/paymentDelete.ts b/src/lib/actions/paymentDelete.ts index dab905c..19df372 100644 --- a/src/lib/actions/paymentDelete.ts +++ b/src/lib/actions/paymentDelete.ts @@ -1,7 +1,7 @@ import { ActionResponse } from '@/lib/types/actionResponse'; import prisma from '@/prisma'; import { URL_SIGN_IN } from '@/lib/constants'; -import { getSession } from '@auth0/nextjs-auth0'; +import { auth0 } from '@/lib/auth'; export default async function paymentDelete(id: number): Promise { 'use server'; @@ -14,7 +14,7 @@ export default async function paymentDelete(id: number): Promise }; } - const session = await getSession(); + const session = await auth0.getSession(); if (!session) { return { type: 'error',