vrba
vrba
TTCTheo's Typesafe Cult
Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
Try making the trpc call with something like postmen and check what do you get back or call the api from the client and check network
13 replies
TTCTheo's Typesafe Cult
Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
I fixed my problem i had an auth middleware that was doing a 307 redirect and breaking call
13 replies
TTCTheo's Typesafe Cult
Created by jack on 11/11/2023 in #questions
upgraded to new ct3a; all trpc calls throwing 'Unexpected token r in JSON at position 0'
@jack did you mange to figure it out I got the same thing just now
13 replies
TTCTheo's Typesafe Cult
Created by vrba on 4/26/2023 in #questions
Problems with next-auth middleware
I found the problem is in using sessions, not using jwt. Is there an easy way to move to jwt, without changing the app in a big way
2 replies
TTCTheo's Typesafe Cult
Created by max14 on 12/18/2022 in #questions
Safe to use a DB item Id inside url?
i would recommend using slugs that are generated bases on some field, that makes the SEO a bit better if that is needed and also it makes the user exp a bit better since they can get a bit of the information on the url
23 replies
TTCTheo's Typesafe Cult
Created by nexxel on 11/21/2022 in #questions
need help with a complex db query
i think this is the best way if there is a limit (and there should be)
46 replies
TTCTheo's Typesafe Cult
Created by nexxel on 11/21/2022 in #questions
need help with a complex db query
but i am not sure can prisma help you with that
46 replies
TTCTheo's Typesafe Cult
Created by nexxel on 11/21/2022 in #questions
need help with a complex db query
if you want to do this directly on the db level you would need to use
CASE
CASE
46 replies
TTCTheo's Typesafe Cult
Created by nexxel on 11/21/2022 in #questions
need help with a complex db query
the easiest way is to check if you get any posts if not to go to the db again and do the other query
46 replies
TTCTheo's Typesafe Cult
Created by utdev on 11/9/2022 in #questions
Postgres get number of rows from query
if you removed the group by yes
19 replies
TTCTheo's Typesafe Cult
Created by utdev on 11/9/2022 in #questions
Postgres get number of rows from query
no problem glad to help 🙂
19 replies
TTCTheo's Typesafe Cult
Created by utdev on 11/9/2022 in #questions
Postgres get number of rows from query
try
COUNT(DISTINCT city, title)
COUNT(DISTINCT city, title)
19 replies
TTCTheo's Typesafe Cult
Created by utdev on 11/9/2022 in #questions
Postgres get number of rows from query
if not there, then insted of
SELECT
city, title
SELECT
city, title
USE
SELECT COUNT(*)
SELECT COUNT(*)
19 replies
TTCTheo's Typesafe Cult
Created by utdev on 11/9/2022 in #questions
Postgres get number of rows from query
speed wise, if you just need the count there is no need to use
GROUP BY
GROUP BY
19 replies