lecookie
lecookie
TTCTheo's Typesafe Cult
Created by lecookie on 8/29/2023 in #questions
Get Role and protected route
How could I let's say make an /admin route where if I am not authenticated it will redirect to directly the discord auth link and if I am it will check a db if the user has admin set to true. If yes it will then fetch another db for some data and return it. Please ping or dm when you respond
11 replies
TTCTheo's Typesafe Cult
Created by lecookie on 8/11/2023 in #questions
Not get duplicates
Is there any way I can use db.createMany but let's say the prisma is like this
name: name1
subname: name2
name: name1
subname: name2
and if all things are the same to skip
3 replies
TTCTheo's Typesafe Cult
Created by lecookie on 8/2/2023 in #questions
Events using prisma
Is there any way I can make some kind of database events using prisma like on create event. I know I can use extend but it's only when using prisma and not for other db connections. Also I find it a little confusing
7 replies
TTCTheo's Typesafe Cult
Created by lecookie on 6/28/2023 in #questions
Admin dashboard
How could I create an admin dashboard where if the user is not authenticated with next-auth it goes to /login but if he does not have admin give a 403 ? Maybe something like roles ?
6 replies