2old4this
02/27/2022, 4:38 PMak4zh
02/27/2022, 4:43 PMRhogaar
02/27/2022, 5:28 PMDarryl
02/27/2022, 6:01 PMhanako
02/27/2022, 6:27 PMprisma.home.findMany()
invocation:
Can't reach database server at `db.gbipqzshtnpxnvypbilh.supabase.co`:`5432`
Please make sure your database server is running at `db.gbipqzshtnpxnvypbilh.supabase.co`:`5432`.`hanako
02/27/2022, 6:30 PMnkeating
02/28/2022, 5:32 AMbradgarropy
02/28/2022, 5:57 AMtodos
table setup from the Supabase templates. I'd like users to be able to to all of the CRUD operations (INSERT
, SELECT
, UPDATE
, DELETE
) on their own data.
I've set up a table that looks like the one above, and set up RLS as shown above.
I'm running into an issue where a logged in user
is unable to SELECT
any data at all. There are no errors in the API request, just seeing an empty array []
for the returned data
object.
The only difference between my table and the example todos
table are a few of the column names, one of which being userId
in my table versus user_id
in the example table.
Could that make a difference? If so, why?
Here is my source code if you're interested in taking a peek.
https://github.com/bradgarropy/next-todoBoni
02/28/2022, 9:53 AMVinz
02/28/2022, 10:23 AMTremalJack
02/28/2022, 10:48 AMPaul
02/28/2022, 12:26 PMPaul
02/28/2022, 1:04 PMPaul
02/28/2022, 3:01 PMbradgarropy
02/28/2022, 3:07 PMPaul
02/28/2022, 3:09 PMwarlic
02/28/2022, 3:20 PMwarlic
02/28/2022, 3:21 PMwarlic
02/28/2022, 3:21 PMPaul
02/28/2022, 3:25 PMSELECT
"constraintId",
sja."audienceId",
sja."segment",
sjs."source",
sjct."constraintType",
"constraintValue",
"targeting",
"frequency",
"period"
FROM "SignalJourneyAudienceConstraints"
JOIN "SignalJourneySource" sjs ON "SignalJourneyAudienceConstraints"."sourceId" = sjs."sourceId"
JOIN "SignalJourneyConstraintType" sjct ON sjct."constraintTypeId" = "SignalJourneyAudienceConstraints"."constraintTypeId"
JOIN "SignalJourneyAudiences" sja ON sja."audienceId" = "SignalJourneyAudienceConstraints"."audienceId";
Paul
02/28/2022, 3:25 PMconst { data, error } = await supabase.from(
'SignalJourneyAudienceConstraints'
).select(`
constraintId,
audienceId:SignalJourneyAudiences (audienceId),
segment:SignalJourneyAudiences (audienceId),
source:SignalJourneySource (sourceId),
constraintType:SignalJourneyConstraintType (constraintTypeId),
constraintValue,
targeting,
frequency,
period
`);
Paul
02/28/2022, 3:32 PMsource: {sourceId: 3}
it kinda works...i just need toe source and not the idPaul
02/28/2022, 3:35 PM{
"constraintId": 1,
"constraintValue": "*webmd.com/allergies*",
"targeting": true,
"frequency": 1,
"period": 1,
"audienceId": {
"audienceId": 1
},
"segment": {
"audienceId": 1
},
"source": {
"sourceId": 3
},
"constraintType": {
"constraintTypeId": 20
}
}
Paul
02/28/2022, 3:35 PMUnhandled Runtime Error
Error: Objects are not valid as a React child (found: object with keys {audienceId}). If you meant to render a collection of children, use an array instead.
garyaustin
02/28/2022, 3:52 PMnoaxis
02/28/2022, 4:50 PMsaiarjun546
02/28/2022, 4:57 PMsaiarjun546
02/28/2022, 4:57 PMsaiarjun546
02/28/2022, 4:57 PMnoaxis
02/28/2022, 4:59 PM