add payment and integration with midtrans
This commit is contained in:
@@ -14,8 +14,8 @@ export const bookingRepo = {
|
||||
},
|
||||
|
||||
async findByTripAndUser(tripId: string, userId: string) {
|
||||
return prisma.booking.findFirst({
|
||||
where: { tripId, userId },
|
||||
return prisma.booking.findUnique({
|
||||
where: { tripId_userId: { tripId, userId } },
|
||||
include: { payments: { orderBy: { createdAt: "desc" } } },
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user