#75 a small validation check to see if comment text is not null or empty

This commit is contained in:
Hamid Reza Mohammadi 2021-02-16 19:23:23 +03:30
parent afab347c8e
commit d784559087

View File

@ -537,6 +537,11 @@ namespace RMuseum.Services.Implementation
{ {
try try
{ {
if(string.IsNullOrEmpty(content))
{
return new RServiceResult<GanjoorCommentSummaryViewModel>(null, "متن حاشیه خالی است.");
}
GanjoorComment comment = new GanjoorComment() GanjoorComment comment = new GanjoorComment()
{ {
UserId = userId, UserId = userId,