Roshan J.
07/03/2022, 3:07 PMMurkrage
07/03/2022, 3:27 PMauth.verifyOTP()
in NextJS and subsequently redirecting to the page that you should now have access to, it unfortunately redirects the user straight back to login. Here's the code that I'm using:
ts
const verifyOTP = async () => {
const { user, error } = await supabaseClient.auth.verifyOTP({
email: getValues('email'),
token: getValues('otp'),
type: 'magiclink',
});
if (error) {
console.log('Error while verifying OTP', error);
return;
}
if (user) {
console.log('Logged in');
setTimeout(() => {
console.log('redirecting to recipes');
router.push('/recipes');
}, 1500);
}
};
garyaustin
07/03/2022, 3:46 PMMurkrage
07/03/2022, 3:47 PMhoesmean
07/03/2022, 5:16 PMid,
name,
telephone,
isSponsored,
img,
category(id,name)
)
setCard(data);
console.log(data);
}Marcos Abreu
07/03/2022, 5:20 PMXHR GET https://notas-sytech.pages.dev/api/getUser
[HTTP/3 404 Not Found 93ms]
What is my mess and how can I fix it?Juninhopo
07/03/2022, 9:56 PMsilentworks
07/03/2022, 11:51 PMsilentworks
07/03/2022, 11:51 PMbhaskar
07/04/2022, 12:15 AMinvalid input syntax for type integer: "-122.1200894"
for rpc function call. lat and long are decimal on the function and it is number on the frontend as well.
const { data, error } = await client
.rpc('get_nearby', {
page_count: propertyRequest.pageInfo.pageCount,
page: propertyRequest.request.coordinates.lng,
distance: 10000,
lat: propertyRequest.request.coordinates.lat,
long: propertyRequest.request.coordinates.lng,
});
need help here.garyaustin
07/04/2022, 12:20 AMbhaskar
07/04/2022, 12:24 AMcreate or replace function public.get_nearby
(lat DECIMAL, long DECIMAL, distance DECIMAL, page_count INTEGER, page INTEGER )
returns setof properties
language sql
as $$
select * from
(select * from properties where
ST_DWithin(ST_Point(latitude, longitude)::geography, ST_Point( lat, long)::geography, distance)
order by st_distance(ST_Point(latitude, longitude)::geography, ST_Point( lat, long)::geography), properties.id
) a
LIMIT (page_count) offset page;
$$;
select * from get_nearby(47.68079669999999, -122.1200894, 10000, 2, 9)bhaskar
07/04/2022, 12:29 AMgaryaustin
07/04/2022, 12:33 AMbhaskar
07/04/2022, 12:36 AMbhaskar
07/04/2022, 12:41 AMgaryaustin
07/04/2022, 12:58 AMbhaskar
07/04/2022, 12:59 AMjaitaiwan
07/04/2022, 1:49 AMbenten
07/04/2022, 2:21 AMbenten
07/04/2022, 2:21 AMPostgrestBuilder<T> | PromiseLike<PostgrestSingleResponse<T>>
the return value either an array or an object which is obviously badLEGEND
07/04/2022, 3:46 AMkiwicrog
07/04/2022, 3:55 AMSteve
07/04/2022, 6:34 PMSteve
07/04/2022, 6:38 PMBrunowilliang
07/04/2022, 10:48 PMsilentworks
07/04/2022, 10:59 PM7seas3c
07/05/2022, 5:26 AMsegmentation fault
. How do I solve it?reblis
07/05/2022, 8:57 PMuseEffect(() => {
if (isVisible && !_supabasePost) {
const post = supabase
.from("post:id=eq." + initialPost.id)
.on("*", (payload) => {
console.log(`Post updated`, payload);
fetchPost(initialPost.id);
})
.subscribe();
_setSupabasePost(post);
const postComments = supabase
.from("post:parent_id=eq." + initialPost.id)
.on("*", (payload) => {
console.log(`Comments updated`, payload);
fetchPost(initialPost.id);
})
.subscribe();
_setSupabasePostComments(postComments)
}
}, [isVisible]);
Are there any other things I may be missing? I've also disabled RLS on the table