Scale unique answer tracking

This commit is contained in:
hz
2026-07-13 02:11:54 -05:00
parent 700da4e415
commit f2c59388eb
23 changed files with 1064 additions and 131 deletions
@@ -8,13 +8,9 @@ public class QuestionReportStore
{
private readonly IMongoCollection<QuestionReport> _reports;
public QuestionReportStore(IConfiguration cfg)
public QuestionReportStore(MongoDatabaseProvider mongo)
{
var connectionString = cfg["MongoDB:ConnectionString"] ?? "mongodb://127.0.0.1:27017";
var databaseName = cfg["MongoDB:DatabaseName"] ?? "GameDb";
var client = new MongoClient(connectionString);
var database = client.GetDatabase(databaseName);
_reports = database.GetCollection<QuestionReport>("QuestionReports");
_reports = mongo.Database.GetCollection<QuestionReport>("QuestionReports");
_reports.Indexes.CreateMany(
[