mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-02 05:54:20 +01:00
fix: makers filters bug
This commit is contained in:
@@ -203,6 +203,7 @@ export interface NexusGenObjects {
|
||||
lnurl_callback_url?: string | null; // String
|
||||
screenshots: string[]; // [String!]!
|
||||
thumbnail_image: string; // String!
|
||||
title: string; // String!
|
||||
votes_count: number; // Int!
|
||||
website: string; // String!
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ const getMakersInTournament = extendType({
|
||||
name: {
|
||||
contains: args.search,
|
||||
mode: 'insensitive'
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
jobTitle: {
|
||||
contains: args.search,
|
||||
mode: 'insensitive'
|
||||
@@ -135,6 +137,7 @@ const getMakersInTournament = extendType({
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
if (args.roleId) filters.push({
|
||||
roles: {
|
||||
some: {
|
||||
@@ -143,6 +146,8 @@ const getMakersInTournament = extendType({
|
||||
}
|
||||
})
|
||||
|
||||
console.log(filters[0]);
|
||||
|
||||
|
||||
return prisma.user.findMany({
|
||||
...(filters.length > 0 && {
|
||||
|
||||
Reference in New Issue
Block a user