https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • a

    assistattow

    12/01/2021, 11:25 AM
    *loading an old version on my phone thats unchanged and worked a few hours ago
  • h

    HarryET

    12/01/2021, 11:25 AM
    all seams to be working for me @User might be worth posting in #843999948717555735
  • a

    assistattow

    12/01/2021, 11:29 AM
    Just got an error for upserting data. Think its just an issue on their end right now
  • n

    Nascode

    12/01/2021, 2:07 PM
    hello, is creating two projects for production and staging db still the reccomended approach?
  • k

    Khan W

    12/01/2021, 3:10 PM
    POV: you heard real-time security mentioned in spaces
  • k

    Khan W

    12/01/2021, 3:42 PM
    After hearing what the updates actually were 🔥
  • b

    batuhanbilginn

    12/01/2021, 4:00 PM
    I'm having problem with Realtime and RLS on my Supabase project. Only authenticated policy doesn't work and I can't listen any of of my realtime tables. Is there anyone who is facing with same problems?
  • p

    pedrodiaz

    12/01/2021, 4:01 PM
    that was fast
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:02 PM
    Hi, I'm struggling with the delete subscription, I have no idea why it isn't working. Been tryna debug for an hour now.
    Copy code
    js
      React.useEffect(() => {
        if (!room) {
          return
        }
        const onDeleteRoomSubscription = supabase
          .from<Room>(`rooms:id=eq.${room.id}`)
          .on('DELETE', () => {
            toast.success(`Room ${room.title} was deleted!`)
            push('/rooms')
          })
          .subscribe()
    
        return () => {
          supabase.removeSubscription(onDeleteRoomSubscription)
        }
      }, [push, room])
    
    
      const deleteRoom = async () =>
        await supabase.from<Room>('rooms').delete().eq('id', roomId).single()
    I can delete a room, but the realtime stuff ain't happening, the code within the subscription, been console logging all over the place 😒
    • 1
    • 2
  • b

    batuhanbilginn

    12/01/2021, 4:04 PM
    Do other events work? (update, insert etc.)
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:05 PM
    im using it in navigation, UPDATE on users table
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:05 PM
    so ye
  • b

    batuhanbilginn

    12/01/2021, 4:06 PM
    .on('*', () => { if (payload.eventType === "INSERT") { toast.success(
    Room ${room.title} was deleted!
    ) push('/rooms')} })
  • b

    batuhanbilginn

    12/01/2021, 4:06 PM
    maybe you can try like that
  • b

    batuhanbilginn

    12/01/2021, 4:06 PM
    sorry "DELETE"
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:06 PM
    yeah imma check if it happens on all events
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:06 PM
    yeah, good idea 🙏 🙏
  • b

    batuhanbilginn

    12/01/2021, 4:07 PM
    In my project all events are broken actually 🙂
  • p

    pedrodiaz

    12/01/2021, 4:08 PM
    a
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:08 PM
    god damn
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:08 PM
    yo boss
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:09 PM
    @User this works
    Copy code
    React.useEffect(() => {
        const onDeleteRoomSubscription = supabase
          .from<Room>('rooms')
          .on('*', () => {
            console.log('Room deleted')
            toast.success(`Room ${room?.title} was deleted!`)
            push('/rooms')
          })
          .subscribe()
    
        return () => {
          supabase.removeSubscription(onDeleteRoomSubscription)
        }
      }, [push, room])
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    switching it to delete doesn't work
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    god damn man 😩 , struggling so much with supabase 😅
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    everyone on twitter be loving it, but i had such ups and downs with it lul
  • b

    batuhanbilginn

    12/01/2021, 4:10 PM
    Did you enabled RLS on those tables?
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    lemme check boss
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    nah
  • t

    Tiger Abrodi 🐆

    12/01/2021, 4:10 PM
    idk what that is
  • b

    batuhanbilginn

    12/01/2021, 4:11 PM
    It's a new feature. You can protect realtime tables with RLS. Only authenticated user can see the realtime updates etc.
1...149150151...392Latest