Improve question review and image handling
This commit is contained in:
@@ -9,6 +9,7 @@ public class QuestionSearchRequest
|
||||
public int? DifficultyMax { get; set; }
|
||||
public int Limit { get; set; } = 40;
|
||||
public bool SupportsChoicePools { get; set; }
|
||||
public bool RequireMedia { get; set; }
|
||||
public List<string> ExcludeExternalIds { get; set; } = [];
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ public class QuestionStore
|
||||
filters.Add(builder.Gte(q => q.Difficulty, req.DifficultyMin.Value));
|
||||
if (req.DifficultyMax is not null)
|
||||
filters.Add(builder.Lte(q => q.Difficulty, req.DifficultyMax.Value));
|
||||
if (req.RequireMedia)
|
||||
filters.Add(builder.Exists("Media.0", true));
|
||||
var excludedIds = req.ExcludeExternalIds
|
||||
.Where(id => !string.IsNullOrWhiteSpace(id))
|
||||
.Select(id => id.Trim())
|
||||
|
||||
Reference in New Issue
Block a user