Rename "user" column in beerPostLikes, add ERD gen

This commit is contained in:
Aaron William Po
2023-02-13 17:05:00 -05:00
parent 249bfdaf5a
commit ea516e91b5
11 changed files with 2885 additions and 19 deletions

View File

@@ -1,11 +1,6 @@
import DBClient from '@/prisma/DBClient';
const findBeerPostLikeById = async (beerPostId: string, userId: string) =>
DBClient.instance.beerPostLike.findFirst({
where: {
beerPostId,
userId,
},
});
const findBeerPostLikeById = async (beerPostId: string, likedById: string) =>
DBClient.instance.beerPostLike.findFirst({ where: { beerPostId, likedById } });
export default findBeerPostLikeById;