Get image upload to cloudinary with the same public id

This means we can put a consistent url in the head for the card image
This commit is contained in:
Kurt Hutten
2021-08-14 15:19:48 +10:00
parent 50e9ac61f8
commit 32155ba98c
17 changed files with 425 additions and 77 deletions

View File

@@ -56,12 +56,24 @@ model Project {
userId String
deleted Boolean @default(false)
cadPackage CadPackage @default(openscad)
socialCard SocialCard?
Comment Comment[]
Reaction ProjectReaction[]
@@unique([title, userId])
}
model SocialCard {
id String @id @default(uuid())
projectId String
project Project @relation(fields: [projectId], references: [id])
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
url String? // link to cloudinary
outOfDate Boolean @default(true)
}
model ProjectReaction {
id String @id @default(uuid())
emote String // an emoji