Skip to content

Commit

Permalink
fix : next auth removal
Browse files Browse the repository at this point in the history
  • Loading branch information
nowrobin committed Jul 10, 2024
1 parent 3a98bd9 commit e80cb9d
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 257 deletions.
155 changes: 4 additions & 151 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@vercel/analytics": "^1.3.1",
"@vercel/postgres": "^0.8.0",
"next": "14.2.3",
"next-auth": "^4.24.7",
"react": "^18",
"react-dom": "^18",
"zustand": "^4.5.4"
Expand Down
75 changes: 32 additions & 43 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
@@ -1,57 +1,46 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url=env("DATABASE_URL")
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}


// url = env("POSTGRES_PRISMA_URL") // uses connection pooling
// directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
model FeedBack {
id Int @id @default(autoincrement())
feedback String
vote Int @default(0)
id Int @id @default(autoincrement())
feedback String
vote Int @default(0)
}

enum Provider{
GOOGLE
EMAIL
KAKAO
}
model User {
id Int @id @default(autoincrement())
username String
provider Provider
email String? @unique
profile_Image String? @unique
createdAt DateTime @default(now())
access_token String?
refresh_token String?
upLoaded_Posts Quote[] @relation("Upload")
liked_Posts Quote[] @relation("Completed")
completedPosts Quote[] @relation("Liked")
id Int @id @default(autoincrement())
username String
provider String?
email String? @unique
profile_Image String? @unique
auth_id String @unique
upLoaded_Posts Quote[] @relation("Upload")
Quote_Quote_completed_UserIdToUser Quote[] @relation("Quote_completed_UserIdToUser")
Quote_Quote_liked_userIdToUser Quote[] @relation("Quote_liked_userIdToUser")
}

model Quote {
id Int @id @default(autoincrement())
upload_userId Int
author String
content String
createdAt DateTime @default(now())
private Boolean?
view Int @default(0)
upload_User User @relation("Upload", fields: [upload_userId], references: [id])
User_Quote_completed_UserIdToUser User[] @relation("Quote_completed_UserIdToUser")
User_Quote_liked_userIdToUser User[] @relation("Quote_liked_userIdToUser")
}

model Quote{
id Int @id
upload_User User @relation("Upload",fields: [upload_userId], references: [id])
completed_User User[] @relation("Completed")
liked_User User[] @relation("Liked")
upload_userId Int
completed_UserId Int
liked_userId Int
author String
content String
createdAt DateTime @default(now())
private Boolean
view Int @default(0)
enum Provider {
GOOGLE
EMAIL
KAKAO
}
43 changes: 0 additions & 43 deletions src/app/api/auth/[...nextauth]/route.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/app/api/auth/confirm/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export async function GET(request: NextRequest) {
redirect(next);
}
}

// redirect the user to an error page with some instructions
redirect("/error");
}
Loading

0 comments on commit e80cb9d

Please sign in to comment.