Initial commit
This commit is contained in:
@@ -20,6 +20,13 @@ const resolveRatingForComment = async ({ creatorId, targetUserId, rate }) => {
|
||||
const existingRating = await findExistingUserRating(creatorId, targetUserId)
|
||||
|
||||
if (existingRating) {
|
||||
if (rate && rate >= 1 && rate <= 5) {
|
||||
return {
|
||||
ratingValue: null,
|
||||
isNewRating: false,
|
||||
alreadyRated: true,
|
||||
}
|
||||
}
|
||||
return { ratingValue: null, isNewRating: false }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user