feat: add missing abilities (#354)
feat: add all missing abilities rules on resolvers
This commit is contained in:
@ -1,15 +0,0 @@
|
||||
import { Workspace } from '@prisma/client';
|
||||
|
||||
type FindManyArgsType = { where?: object; orderBy?: object };
|
||||
|
||||
export const prepareFindManyArgs = <T extends FindManyArgsType>(
|
||||
args: T,
|
||||
workspace: Workspace,
|
||||
): T => {
|
||||
args.where = {
|
||||
...args.where,
|
||||
...{ workspace: { is: { id: { equals: workspace.id } } } },
|
||||
};
|
||||
|
||||
return args;
|
||||
};
|
||||
Reference in New Issue
Block a user