Arthur Danjou 🧸
Arthur Danjou 🧸
Explore posts from servers
NNuxt
Created by Arthur Danjou 🧸 on 7/30/2024 in #❓・help
Nuxt Error
No description
1 replies
DTDrizzle Team
Created by Arthur Danjou 🧸 on 4/17/2024 in #help
Migration from prisma to Drizzle
Hello, i'm migrating from prisma to drizzle in my nuxt 3 app. I have some issues migrating this file:
export default defineEventHandler(async (event) => {
const { favorite, category } = getQuery(event)
const prisma = usePrisma()

let whereClause: any

if (favorite === 'true') {
category === 'all'
? whereClause = {
favorite: true,
categories: { every: { category: {} } },
}
: whereClause = {
favorite: true,
categories: { some: { category: { slug: category } } },
}
}
else {
category === 'all'
? whereClause = {
categories: { every: { category: {} } },
}
: whereClause = {
categories: { some: { category: { slug: category } } },
}
}

return await prisma.talent.findMany({
where: whereClause,
orderBy: {
name: 'asc',
},
include: {
categories: {
include: {
category: true,
},
orderBy: {
category: {
name: 'asc',
},
},
},
},
})
})
export default defineEventHandler(async (event) => {
const { favorite, category } = getQuery(event)
const prisma = usePrisma()

let whereClause: any

if (favorite === 'true') {
category === 'all'
? whereClause = {
favorite: true,
categories: { every: { category: {} } },
}
: whereClause = {
favorite: true,
categories: { some: { category: { slug: category } } },
}
}
else {
category === 'all'
? whereClause = {
categories: { every: { category: {} } },
}
: whereClause = {
categories: { some: { category: { slug: category } } },
}
}

return await prisma.talent.findMany({
where: whereClause,
orderBy: {
name: 'asc',
},
include: {
categories: {
include: {
category: true,
},
orderBy: {
category: {
name: 'asc',
},
},
},
},
})
})
. Can you help me ? You can find my code here : https://github.com/arthurDanjou/website-v2/tree/drizzle and my schema here : https://github.com/ArthurDanjou/website-v2/blob/drizzle/server/database/schema.ts
6 replies
NNuxt
Created by Arthur Danjou 🧸 on 2/24/2024 in #❓・help
Vercel custom domain is removing components
Hi, I am deploying my portfolio on Vercel using my custom domain. My main adress is https://arthurdanjou.fr. When I use the vercel adress : https://arthurdanjou.vercel.app/, the loading is faster and the background animation is not removed. This is the same version, the same project but when I use my custom adress, the content is loaded a first time, then a second time without the background. Why does this append ? You can find my code here: https://github.com/arthurdanjou/website-v2
1 replies
NNuxt
Created by Arthur Danjou 🧸 on 3/29/2023 in #❓・help
Nuxt-TRPC with Prisma and supabase deployed to Vercel
Hello, When I go to my website url (https://website-arthurdanjou.vercel.app/), I see the content and after I am redirected to the error page with this error : error caught during app initialization TRPCClientError: Unable to transform response from server I think nitro api isnt built in the correct directory for vercel. You can find my code here : https://github.com/arthurdanjou/artdanj-website-v2 I built using nuxi build and start with nuxi preview I've specified nitro preset in my nuxt.config.ts. Where does my problem come from ? How to fix it ? Thank's for reading
8 replies