Refactor: update types for brewery comments

This commit is contained in:
Aaron William Po
2023-10-07 15:21:57 -04:00
parent 2ee12d351f
commit 3b626e2f95
13 changed files with 3388 additions and 3517 deletions

View File

@@ -1,6 +1,6 @@
import DBClient from '@/prisma/DBClient';
import { z } from 'zod';
import BeerCommentQueryResult from './schema/BeerCommentQueryResult';
import CommentQueryResult from '../schema/CommentSchema/CommentQueryResult';
interface FindBeerCommentArgs {
beerCommentId: string;
@@ -8,7 +8,7 @@ interface FindBeerCommentArgs {
const findBeerCommentById = async ({
beerCommentId,
}: FindBeerCommentArgs): Promise<z.infer<typeof BeerCommentQueryResult> | null> => {
}: FindBeerCommentArgs): Promise<z.infer<typeof CommentQueryResult> | null> => {
return DBClient.instance.beerComment.findUnique({
where: { id: beerCommentId },
select: {