nickbrinser
08/05/2022, 11:42 PMwithPageAuth
should I expect InferGetServerSideProps
to work properly?
2. `getUser()`'s return type is resolving user and error as any
.
Anyone else seeing this?neupaneanish
08/06/2022, 8:35 AMbh
08/06/2022, 9:41 AMimousart
08/06/2022, 1:07 PMgaryaustin
08/06/2022, 2:31 PMimousart
08/06/2022, 2:33 PMOlyno
08/06/2022, 2:38 PMjoshcowan25
08/07/2022, 4:51 AMjoshcowan25
08/07/2022, 4:51 AMjoshcowan25
08/07/2022, 4:52 AMsilentworks
08/07/2022, 8:59 AMJer
08/07/2022, 11:24 PMgaryaustin
08/07/2022, 11:47 PMJer
08/08/2022, 12:03 AMgaryaustin
08/08/2022, 12:05 AMNeedle
08/08/2022, 12:20 PMapollo79
08/08/2022, 12:59 PMKellen Mace
08/08/2022, 2:06 PMrules
table, I need to also delete the rows in the checks
and mentions
tables that are related to that rule.
Per my RLS policies, users can delete rows from rules
if they created them, but can not delete anything from checks
and mentions
– those tables are used for internal purposes.
What's the best way to delete this data? Here are two options I came up with:
* Option 1: Create a postgres function that accepts a Rule ID and deletes the rows in checks
and mentions
that are related to that rule. Set up a trigger so that when a Rule is deleted, that function executes.
* Option 2: Create a postgres function that is responsible for deleting the data from all three of those tables (using the Service role to delete the data in checks
and mentions
), and call that postgres function from my frontend app using the JavaScript RPC API
I think #1 is probably the cleaner approach. I'd love to get some feedback on it, though! Which do you think is best? Is there a third option I haven't considered?chano08
08/08/2022, 2:24 PMsupabase.from('table1').select('id as _id')
?unknown1337
08/08/2022, 3:04 PMmikewilliams
08/08/2022, 8:44 PMDex_Vinyl
08/08/2022, 9:17 PMconst {reasonData, reasonError } = await supabase
.from('libraryUnavailableReasons')
.select("*")
//.eq('unavailablereason',arrayToWrite.uarid)
console.log("Reason: "+reasonData)
returns : undefined
but if I change reasonData
to data
it works to a point ... I still can't access the data in the objects that are returned, all I get is either 0
or 1
, I don't like using such generic variables, though, can anyone advise on either of these issues?srgg
08/08/2022, 9:31 PMlocalhost:3000
I was met with what looked like failed redirects or dead links. I believe they're a malformed URL, but cannot tell if it's something I've done (modified the repo very little).
To clarify: Any magic auth login sends the appropriate email and registers a user, except when set to localhost:3000, I get {"message":"No API key found in request"}
- despite seeing the api key in the returned header.
If anyones had a similar issue with magic auth providing dead redirects, could you help point me in the right direction? Happy to share the repo or provide any clarification. Thank you.hexcowboy
08/09/2022, 8:59 AMjs
const { data, error } = await supabase.from("my_table").insert(
[
{
id: randomUUID(),
},
]
);
as an admin (no auth) and bypass the rls protectionReact noob
08/09/2022, 9:10 PMts
useEffect(() => {
loadProfile()
}, [])
useEffect(() => {
downloadImage()
}, [])
// Function
async function loadProfile() {
const { data, error } = await supabase.from('profiles').select('*').eq('id', user?.id).single()
if (error) console.log(error)
else setProfile(data)
}
async function downloadImage() {
await supabase.storage.from('avatars').download(avatar_url)
if (responseBlob) {
const blob = new Blob([responseBlob], { type: 'image/*' })
const imgUrl = window.URL.createObjectURL(blob);
if (imgUrl) {
setSrc(imgUrl)
}
}
i don't understand why but i always got a 404 error not found. but the url i provided is correctGuySake
08/10/2022, 9:00 AMjs
supabase.from(`projects:id=in.(${projectsIds})`)
.on('UPDATE', (payload) => {
console.log('Change received in projects list', payload)
}).subscribe()
My guess was that it would work like in the doc with id=eq.200'
. So my question is, is the in.(${arr})
available ? Or is it only eg.${val}
?unalive8
08/10/2022, 1:15 PMhexcowboy
08/11/2022, 3:24 AMPoisnFang
08/11/2022, 5:24 AMsql
select *
from my_tableas f
where f.this_column = f.another_column
Olyno
08/11/2022, 1:14 PM