const lastIdResult = prisma.descriptionDiff.findFirst({
where: {
packageId: thisPackage.id
},
orderBy: {
createdAt: 'desc'
}
});
// need to check if this result is null or not
if (lastIdResult) {
if (lastIdResult.id === thisPackage.last_diff_id) {
return false
}
}
const lastIdResult = prisma.descriptionDiff.findFirst({
where: {
packageId: thisPackage.id
},
orderBy: {
createdAt: 'desc'
}
});
// need to check if this result is null or not
if (lastIdResult) {
if (lastIdResult.id === thisPackage.last_diff_id) {
return false
}
}