chore: implement pr feedback

This commit is contained in:
pit
2023-10-11 12:32:33 +03:00
parent 9e0d281883
commit e02ab7d256
7 changed files with 154 additions and 130 deletions

View File

@ -15,7 +15,7 @@ export const updateUser = async ({ id, name, email, roles }: UpdateUserOptions)
},
});
const updatedUser = await prisma.user.update({
return await prisma.user.update({
where: {
id,
},
@ -25,5 +25,4 @@ export const updateUser = async ({ id, name, email, roles }: UpdateUserOptions)
roles,
},
});
return updatedUser;
};

View File

@ -2,7 +2,7 @@ import { Prisma } from '@prisma/client';
import { prisma } from '@documenso/prisma';
type getAllUsersProps = {
type GetAllUsersProps = {
username: string;
email: string;
page: number;
@ -14,7 +14,7 @@ export const findUsers = async ({
email = '',
page = 1,
perPage = 10,
}: getAllUsersProps) => {
}: GetAllUsersProps) => {
const whereClause = Prisma.validator<Prisma.UserWhereInput>()({
OR: [
{