Skip to content

Commit 6c8b377

Browse files
committed
feat: move upload logic from avatar to book cover
- add checks on user permissions - randomized file name (not sure it is the right thing to do)
1 parent 2adb42e commit 6c8b377

File tree

13 files changed

+141
-266
lines changed

13 files changed

+141
-266
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@tanstack/zod-adapter": "1.132.47",
6969
"@uidotdev/usehooks": "2.4.1",
7070
"better-auth": "1.3.27",
71-
"better-upload": "2.0.1",
71+
"better-upload": "2.0.3",
7272
"boring-avatars": "2.0.4",
7373
"class-variance-authority": "0.7.1",
7474
"clsx": "2.1.1",

pnpm-lock.yaml

Lines changed: 52 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ model User {
2626
updatedAt DateTime @updatedAt
2727
sessions Session[]
2828
accounts Account[]
29-
avatarFileId String?
3029
3130
role UserRole?
3231
banned Boolean?
@@ -94,6 +93,7 @@ model Book {
9493
genre Genre? @relation(fields: [genreId], references: [id])
9594
genreId String
9695
publisher String?
96+
coverId String?
9797
9898
@@unique([title, author])
9999
@@map("book")

0 commit comments

Comments
 (0)