File tree 16 files changed +35
-12
lines changed
16 files changed +35
-12
lines changed Original file line number Diff line number Diff line change
1
+ DATABASE_URL =
2
+ NEXTAUTH_SECRET =
3
+
4
+ GITHUB_ID =
5
+ GITHUB_SECRET =
6
+
7
+ GOOGLE_CLIENT_ID =
8
+ GOOGLE_CLIENT_SECRET =
9
+
10
+ NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME =
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
3
3
import getCurrentUser from "@/app/common/actions/getCurrentUser" ;
4
- import prisma from "@/libs/prismadb" ;
4
+ import prisma from "@/app/ libs/prismadb" ;
5
5
6
6
interface IParams {
7
7
listingId ?: string ;
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
3
3
import getCurrentUser from "@/app/common/actions/getCurrentUser" ;
4
- import prisma from "@/libs/prismadb" ;
4
+ import prisma from "@/app/ libs/prismadb" ;
5
5
6
6
interface IParams {
7
7
listingId ?: string ;
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
3
- import prisma from "@/libs/prismadb" ;
3
+ import prisma from "@/app/ libs/prismadb" ;
4
4
import getCurrentUser from "@/app/common/actions/getCurrentUser" ;
5
5
6
6
export async function POST (
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
import bcrypt from "bcrypt" ;
3
3
4
- import prisma from "@/libs/prismadb" ;
4
+ import prisma from "@/app/ libs/prismadb" ;
5
5
6
6
export async function POST (
7
7
request : Request ,
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
3
3
import getCurrentUser from "@/app/common/actions/getCurrentUser" ;
4
- import prisma from "@/libs/prismadb" ;
4
+ import prisma from "@/app/ libs/prismadb" ;
5
5
6
6
interface IParams {
7
7
reservationId ?: string ;
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from "next/server" ;
2
2
3
- import prisma from "@/libs/prismadb" ;
3
+ import prisma from "@/app/ libs/prismadb" ;
4
4
import getCurrentUser from "@/app/common/actions/getCurrentUser" ;
5
5
6
6
export async function POST (
Original file line number Diff line number Diff line change 1
1
import { getServerSession } from "next-auth/next"
2
2
3
3
import { authOptions } from "@/pages/api/auth/[...nextauth]" ;
4
- import prisma from "@/libs/prismadb" ;
4
+ import prisma from "@/app/ libs/prismadb" ;
5
5
6
6
export async function getSession ( ) {
7
7
return await getServerSession ( authOptions )
Original file line number Diff line number Diff line change 1
- import prisma from "@/libs/prismadb" ;
1
+ import prisma from "@/app/ libs/prismadb" ;
2
2
3
3
import getCurrentUser from "./getCurrentUser" ;
4
4
Original file line number Diff line number Diff line change 1
- import prisma from "@/libs/prismadb" ;
1
+ import prisma from "@/app/ libs/prismadb" ;
2
2
3
3
interface IParams {
4
4
listingId ?: string ;
Original file line number Diff line number Diff line change 1
- import prisma from "@/libs/prismadb" ;
1
+ import prisma from "@/app/ libs/prismadb" ;
2
2
3
3
export interface IListingsParams {
4
4
userId ?: string ;
Original file line number Diff line number Diff line change 1
- import prisma from "@/libs/prismadb" ;
1
+ import prisma from "@/app/ libs/prismadb" ;
2
2
3
3
interface IParams {
4
4
listingId ?: string ;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ export { default } from "next-auth/middleware"
2
+
3
+ export const config = {
4
+ matcher : [
5
+ "/trips" ,
6
+ "/reservations" ,
7
+ "/properties" ,
8
+ "/favorites"
9
+ ]
10
+ } ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import GithubProvider from "next-auth/providers/github"
5
5
import GoogleProvider from "next-auth/providers/google"
6
6
import { PrismaAdapter } from "@next-auth/prisma-adapter"
7
7
8
- import prisma from "@/libs/prismadb"
8
+ import prisma from "@/app/ libs/prismadb"
9
9
10
10
export const authOptions : AuthOptions = {
11
11
adapter : PrismaAdapter ( prisma ) ,
@@ -52,6 +52,9 @@ export const authOptions: AuthOptions = {
52
52
}
53
53
} )
54
54
] ,
55
+ pages : {
56
+ signIn : '/' ,
57
+ } ,
55
58
debug : process . env . NODE_ENV === 'development' ,
56
59
session : {
57
60
strategy : "jwt" ,
You can’t perform that action at this time.
0 commit comments