Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
Geczy committed Dec 10, 2023
2 parents 70698e6 + ee1e4da commit bfc5d35
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 158 deletions.
4 changes: 2 additions & 2 deletions packages/dota/src/db/getDBUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export default async function getDBUser({
}

let userId = token || null
if (providerAccountId || lookupToken) {
if (providerAccountId) {
const { data, error } = await supabase
.from('accounts')
.select('userId')
.eq('providerAccountId', providerAccountId || lookupToken)
.eq('providerAccountId', providerAccountId)
.single()
userId = data?.userId ?? null

Expand Down
55 changes: 3 additions & 52 deletions packages/dota/src/db/supabase-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type Tables<T extends keyof Database['public']['Tables']> =
Database['public']['Tables'][T]['Row']
export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]

export interface Database {
Expand Down Expand Up @@ -183,35 +181,6 @@ export interface Database {
},
]
}
sessions: {
Row: {
expires: string
id: string
sessionToken: string
userId: string
}
Insert: {
expires: string
id: string
sessionToken: string
userId: string
}
Update: {
expires?: string
id?: string
sessionToken?: string
userId?: string
}
Relationships: [
{
foreignKeyName: 'sessions_userId_fkey'
columns: ['userId']
isOneToOne: false
referencedRelation: 'users'
referencedColumns: ['id']
},
]
}
settings: {
Row: {
created_at: string
Expand Down Expand Up @@ -354,7 +323,7 @@ export interface Database {
kick: number | null
locale: string
mmr: number
name: string | null
name: string
steam32Id: number | null
stream_delay: number | null
stream_online: boolean
Expand All @@ -374,7 +343,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -394,7 +363,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -404,24 +373,6 @@ export interface Database {
}
Relationships: []
}
verificationtokens: {
Row: {
expires: string
identifier: string
token: string
}
Insert: {
expires: string
identifier: string
token: string
}
Update: {
expires?: string
identifier?: string
token?: string
}
Relationships: []
}
}
Views: {
[_ in never]: never
Expand Down
55 changes: 3 additions & 52 deletions packages/twitch/chat/src/db/supabase-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type Tables<T extends keyof Database['public']['Tables']> =
Database['public']['Tables'][T]['Row']
export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]

export interface Database {
Expand Down Expand Up @@ -183,35 +181,6 @@ export interface Database {
},
]
}
sessions: {
Row: {
expires: string
id: string
sessionToken: string
userId: string
}
Insert: {
expires: string
id: string
sessionToken: string
userId: string
}
Update: {
expires?: string
id?: string
sessionToken?: string
userId?: string
}
Relationships: [
{
foreignKeyName: 'sessions_userId_fkey'
columns: ['userId']
isOneToOne: false
referencedRelation: 'users'
referencedColumns: ['id']
},
]
}
settings: {
Row: {
created_at: string
Expand Down Expand Up @@ -354,7 +323,7 @@ export interface Database {
kick: number | null
locale: string
mmr: number
name: string | null
name: string
steam32Id: number | null
stream_delay: number | null
stream_online: boolean
Expand All @@ -374,7 +343,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -394,7 +363,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -404,24 +373,6 @@ export interface Database {
}
Relationships: []
}
verificationtokens: {
Row: {
expires: string
identifier: string
token: string
}
Insert: {
expires: string
identifier: string
token: string
}
Update: {
expires?: string
identifier?: string
token?: string
}
Relationships: []
}
}
Views: {
[_ in never]: never
Expand Down
55 changes: 3 additions & 52 deletions packages/twitch/events/src/db/supabase-types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export type Tables<T extends keyof Database['public']['Tables']> =
Database['public']['Tables'][T]['Row']
export type Json = string | number | boolean | null | { [key: string]: Json | undefined } | Json[]

export interface Database {
Expand Down Expand Up @@ -183,35 +181,6 @@ export interface Database {
},
]
}
sessions: {
Row: {
expires: string
id: string
sessionToken: string
userId: string
}
Insert: {
expires: string
id: string
sessionToken: string
userId: string
}
Update: {
expires?: string
id?: string
sessionToken?: string
userId?: string
}
Relationships: [
{
foreignKeyName: 'sessions_userId_fkey'
columns: ['userId']
isOneToOne: false
referencedRelation: 'users'
referencedColumns: ['id']
},
]
}
settings: {
Row: {
created_at: string
Expand Down Expand Up @@ -354,7 +323,7 @@ export interface Database {
kick: number | null
locale: string
mmr: number
name: string | null
name: string
steam32Id: number | null
stream_delay: number | null
stream_online: boolean
Expand All @@ -374,7 +343,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -394,7 +363,7 @@ export interface Database {
kick?: number | null
locale?: string
mmr?: number
name?: string | null
name?: string
steam32Id?: number | null
stream_delay?: number | null
stream_online?: boolean
Expand All @@ -404,24 +373,6 @@ export interface Database {
}
Relationships: []
}
verificationtokens: {
Row: {
expires: string
identifier: string
token: string
}
Insert: {
expires: string
identifier: string
token: string
}
Update: {
expires?: string
identifier?: string
token?: string
}
Relationships: []
}
}
Views: {
[_ in never]: never
Expand Down

0 comments on commit bfc5d35

Please sign in to comment.