Pairing code auth, replace Facebook OAuth, public feed
- Add PairingCode model, POST /generate + /redeem + GET /status endpoints - Remove facebookId from User, make metaId non-nullable - Delete meta-web routes, link routes, meta-web-auth service - Remove metaWeb config block and hasFacebookLink from responses - Add optionalAuth middleware, make feed publicly accessible - Resolve Twitch channel names for embed broadcastIds
This commit is contained in:
@@ -9,8 +9,7 @@ datasource db {
|
||||
|
||||
model User {
|
||||
id String @id @default(uuid())
|
||||
metaId String? @unique
|
||||
facebookId String? @unique
|
||||
metaId String @unique
|
||||
displayName String
|
||||
email String?
|
||||
avatarUrl String?
|
||||
@@ -22,11 +21,23 @@ model User {
|
||||
linkedAccounts LinkedAccount[]
|
||||
streamPlans StreamPlan[]
|
||||
sessions Session[]
|
||||
pairingCodes PairingCode[]
|
||||
followers Follow[] @relation("following")
|
||||
following Follow[] @relation("follower")
|
||||
likes Like[]
|
||||
}
|
||||
|
||||
model PairingCode {
|
||||
id String @id @default(uuid())
|
||||
code String @unique
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
expiresAt DateTime
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
|
||||
Reference in New Issue
Block a user