Bonteq
10/28/2022, 9:04 PM.update
using the following code const { error } = await supabase
.from('videos')
.update({ current_time: currentTime })
.eq('user', user.value.id)
and it is giving me the error Argument of type '{ current_time: number; }' is not assignable to parameter of type 'never'.ts(2345)
What is the appropriate solution to this?Sarcodo
10/28/2022, 9:05 PMuid() = myLinkTable.user_id
?Sarcodo
10/28/2022, 9:38 PMawait supabase.from("table_1").select(
id,
...columns,
table_2 (
table_2_id_col
...columns
)
)
However I get an error "could not establish a relationship between table_1 and table_2".
Looking at this page: https://supabase.com/blog/postgresql-views it says that a view behaves like a typical table and you can join with it and stuff, but maybe that's only backend joins rather than through the select function in js?ZaDeR47
10/28/2022, 9:53 PM((()))
10/28/2022, 11:10 PMLiam Smith
10/29/2022, 3:37 AMcorasan
10/29/2022, 3:55 AM매튜
10/29/2022, 6:51 AMexport const getServerSideProps = withPageAuth({
redirectTo: '/',
async getServerSideProps(ctx, supabase) {
//const { user } = await getUser(ctx);
// Find out how many words user is currently studying at novice level - maximum allowed is 200
const { data } = await supabase
.from('users_vocabulary')
.select('*', { count: 'exact' })
//.eq('B', user.id);
return { props: { data } };
}
});
The above code worked on the old version of supabase js, but I had to comment out the user selection to make it work on the new version. What is the new equivalent of const { user } = await getUser(ctx);
?osener
10/29/2022, 10:07 AMFailed to create hook: schema "supabase_functions" does not exist
when I try to create the webhook.
Is there a way to develop locally when using this feature?Thoth Trismegistus
10/29/2022, 5:09 PMThoth Trismegistus
10/29/2022, 5:17 PM((()))
10/29/2022, 9:12 PMBibek
10/30/2022, 3:06 AMZaDeR47
10/30/2022, 4:12 AMsupabase
npm package to install the supabase commands)floyare
10/30/2022, 12:43 PMrow_id integer
argument:
update images
set likes = likes + 1
where id = row_id;
and this is my js to run it:
await supabase.rpc('increment', {row_id: id}).then(async (res) =>
{
//do stuff...
})
Response of this rpc have no error or any specific data.
Any ideas?Karbust
10/30/2022, 4:00 PMts
export const getServerSideProps = withPageAuth<Database>({
authRequired: false,
async getServerSideProps(ctx, supabase) {
try {
const { id } = ctx.query
const response = await supabase
.from('Videos')
.select(`
title,
description,
likes,
dislikes,
views,
created_at,
VideoLikes (
type
),
Profiles (
username,
profile_picture_url
),
Servers (
id,
name
)
`)
.eq('id', id)
.limit(1)
.single()
return {
props: {
video: response.data,
userRating: response.data?.VideoLikes && response.data.VideoLikes[0] ? response.data.VideoLikes[0]['type'] : 0
}
}
} catch (error) {
console.error(error)
return { notFound: true }
}
},
})
It works without any issues when there's a logged user, but when there's no user logged in it throws that error.
The code from the supabase query is being executed correctly
Any idea on how to solve it?
Thank you
`next`: 12.3.1
`@supabase/supabase-js`: 2.0.4
`@supabase/auth-helpers-nextjs`: 0.4.2siah
10/31/2022, 8:00 AMcolumn "path_tokens" of relation "objects" already exists
error on the Storage logs, and are unable to upload to or retrieve from storage. This happened after we migrated from an existing project to a new one. Happening on a day we're going to production so would really appreciate any help here! 🙏Kasper
10/31/2022, 8:56 AMPostgrestBuilder.ts
?
Uncaught SyntaxError: The requested module '/node_modules/cross-fetch/dist/browser-ponyfill.js?v=e020469d' does not provide an export named 'default'
dhatGuy
10/31/2022, 2:45 PMconst { data, error } = await supabaseClient
.from("order")
.select(`*, items:order_item(*), user(*)`);
The user property always return null but when I disable RLS on user table, I get the user dataJeremy Deceuster
10/31/2022, 3:27 PMismael1234
10/31/2022, 3:27 PM*,
users(
username
)
);
but it always returns the message "Could not find a relationship between 'posts' and 'users' in the schema cache".
How can I retrieve user data from posts table?Ivan Kartashov
10/31/2022, 3:50 PMDomcario
10/31/2022, 4:44 PMjs
import '../styles/globals.css'
import { createBrowserSupabaseClient } from '@supabase/auth-helpers-nextjs'
import { SessionContextProvider } from '@supabase/auth-helpers-react'
import { useRouter } from 'next/router'
import { useState } from 'react'
function MyApp({ Component, pageProps }) {
const router = useRouter()
const [supabaseClient] = useState(() => createBrowserSupabaseClient())
return (
<SessionContextProvider
supabaseClient={supabaseClient}
initialSession={pageProps.initialSession}>
<Component {...pageProps} />
</SessionContextProvider>
)
}
export default MyApp
psteinroe
10/31/2022, 5:23 PMCheqo
10/31/2022, 5:26 PMrlee128
10/31/2022, 5:54 PMVogelbert
10/31/2022, 6:01 PMDrew
10/31/2022, 6:10 PMUnknown Member
10/31/2022, 6:49 PMreserved_by
already booked the existing listing_id
WITH CHECK (auth.uid() = reserved_by
AND NOT EXISTS
( select 1 from reservations where
listing_created_by = listing_created_by));
Nakatox
10/31/2022, 9:17 PM