mirror of
https://github.com/wassname/talk.git
synced 2026-07-14 11:18:50 +08:00
Remove unnecessary defensive code in CommentsService
This commit is contained in:
@@ -86,8 +86,8 @@ module.exports = class CommentsService {
|
||||
// tag added
|
||||
return;
|
||||
default:
|
||||
console.warn('CommentsService#addTag modified multiple comments, but it should only have modified 1. '
|
||||
+ `You may have bad data. Check for multiple comments with id=${id}`);
|
||||
|
||||
// this should never happen because no multi parameter and unique index on id
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -122,8 +122,8 @@ module.exports = class CommentsService {
|
||||
// tag removed
|
||||
return;
|
||||
default:
|
||||
console.warn('CommentsService#removeTag modified multiple comments, but it should only have modified 1. '
|
||||
+ `You may have bad data. Check for multiple comments with id=${id}`);
|
||||
|
||||
// this should never happen because no multi parameter and unique index on id
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user