Skip to content

Commit

Permalink
added MaxSuggestedTagsCount
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Holub committed Jan 14, 2024
1 parent 33df28c commit 9d7e7fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private async Task<string[]> FindMostMentionedTags(IEnumerable<string> youtubeVi
}
}

return tagOccurrences.OrderByDescending(kv => kv.Value).Take(ValidationRules.Tag.MaxTagsCount).Select(kv => kv.Key).ToArray();
return tagOccurrences.OrderByDescending(kv => kv.Value).Take(ValidationRules.Tag.MaxSuggestedTagsCount).Select(kv => kv.Key).ToArray();
}

private PreviewLinkResponse HandleUnknownSourceLink(string id) =>
Expand Down
1 change: 1 addition & 0 deletions server/src/ShareLink.Domain/ValidationRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static class Tag
{
public const int MinTagsCount = 1;
public const int MaxTagsCount = 5;
public const int MaxSuggestedTagsCount = 3;
public const int MinTagLength = 2;
public const int MaxTagLength = 30;
}
Expand Down

0 comments on commit 9d7e7fc

Please sign in to comment.