Exclude dashboards from boards list
This commit is contained in:
1 parent
f76b22b303
commit
25e60758b5
1 file changed
+7
@@ -1,4 +1,5 @@
|
|||||||
import type { Prisma } from '@/generated/prisma/client';
|
import type { Prisma } from '@/generated/prisma/client';
|
||||||
|
import { BOARD_TYPES } from '@/lib/boards';
|
||||||
import prisma from '@/lib/prisma';
|
import prisma from '@/lib/prisma';
|
||||||
import type { QueryFilters } from '@/lib/types';
|
import type { QueryFilters } from '@/lib/types';
|
||||||
|
|
||||||
@@ -31,6 +32,9 @@ export async function getUserBoards(userId: string, filters?: QueryFilters) {
|
|||||||
{
|
{
|
||||||
where: {
|
where: {
|
||||||
userId,
|
userId,
|
||||||
|
type: {
|
||||||
|
not: BOARD_TYPES.dashboard,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filters,
|
filters,
|
||||||
@@ -42,6 +46,9 @@ export async function getTeamBoards(teamId: string, filters?: QueryFilters) {
|
|||||||
{
|
{
|
||||||
where: {
|
where: {
|
||||||
teamId,
|
teamId,
|
||||||
|
type: {
|
||||||
|
not: BOARD_TYPES.dashboard,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filters,
|
filters,
|
||||||
|
|||||||
Reference in new issue
Block a user