Making swagger functional

This commit is contained in:
hz
2025-08-22 23:47:14 -05:00
parent 676d56288e
commit b1cff86582
4 changed files with 36 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ public class BlacklistService
var dbName = cfg["MongoDB:DatabaseName"] ?? "GameDb";
var client = new MongoClient(cs);
var db = client.GetDatabase(dbName);
_col = db.GetCollection<BlacklistedToken>("token_blacklist");
_col = db.GetCollection<BlacklistedToken>("BlacklistedTokens");
// TTL index so revocations expire automatically
var keys = Builders<BlacklistedToken>.IndexKeys.Ascending(x => x.ExpiresAt);
+1 -1
View File
@@ -13,7 +13,7 @@ public class UserService
var dbName = cfg["MongoDB:DatabaseName"] ?? "GameDb";
var client = new MongoClient(cs);
var db = client.GetDatabase(dbName);
_col = db.GetCollection<User>("users");
_col = db.GetCollection<User>("Users");
var keys = Builders<User>.IndexKeys.Ascending(u => u.Username);
_col.Indexes.CreateOne(new CreateIndexModel<User>(keys, new CreateIndexOptions { Unique = true }));