From b87d9540d03be1c3cb64556aa1dfb71ad333ba85 Mon Sep 17 00:00:00 2001 From: jvyden Date: Tue, 17 May 2022 00:02:28 -0400 Subject: [PATCH] Fix Redis Support I'm too happy about this. https://github.com/redis/redis-om-dotnet/issues/105 --- ProjectLighthouse/Match/Rooms/Room.cs | 1 + ProjectLighthouse/PlayerData/Profiles/UserFriendData.cs | 2 ++ ProjectLighthouse/StorableLists/RedisDatabase.cs | 2 -- ProjectLighthouse/StorableLists/Stores/UserFriendStore.cs | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectLighthouse/Match/Rooms/Room.cs b/ProjectLighthouse/Match/Rooms/Room.cs index 4692ff68..46c4d5d7 100644 --- a/ProjectLighthouse/Match/Rooms/Room.cs +++ b/ProjectLighthouse/Match/Rooms/Room.cs @@ -11,6 +11,7 @@ public class Room { private int roomId; + [Indexed] public int RoomId { get => this.roomId; set { diff --git a/ProjectLighthouse/PlayerData/Profiles/UserFriendData.cs b/ProjectLighthouse/PlayerData/Profiles/UserFriendData.cs index 3524f43b..cbc29cc5 100644 --- a/ProjectLighthouse/PlayerData/Profiles/UserFriendData.cs +++ b/ProjectLighthouse/PlayerData/Profiles/UserFriendData.cs @@ -9,6 +9,8 @@ namespace LBPUnion.ProjectLighthouse.PlayerData.Profiles; public class UserFriendData { private int userId; + + [Indexed] public int UserId { get => this.userId; set { diff --git a/ProjectLighthouse/StorableLists/RedisDatabase.cs b/ProjectLighthouse/StorableLists/RedisDatabase.cs index e219b1e3..f97b127d 100644 --- a/ProjectLighthouse/StorableLists/RedisDatabase.cs +++ b/ProjectLighthouse/StorableLists/RedisDatabase.cs @@ -1,14 +1,12 @@ #nullable enable using System; using System.Globalization; -using System.Linq; using System.Threading.Tasks; using LBPUnion.ProjectLighthouse.Configuration; using LBPUnion.ProjectLighthouse.Extensions; using LBPUnion.ProjectLighthouse.Logging; using LBPUnion.ProjectLighthouse.Match.Rooms; using LBPUnion.ProjectLighthouse.PlayerData.Profiles; -using LBPUnion.ProjectLighthouse.Types; using Redis.OM; using Redis.OM.Contracts; using Redis.OM.Searching; diff --git a/ProjectLighthouse/StorableLists/Stores/UserFriendStore.cs b/ProjectLighthouse/StorableLists/Stores/UserFriendStore.cs index 30a2b5c9..4e17e725 100644 --- a/ProjectLighthouse/StorableLists/Stores/UserFriendStore.cs +++ b/ProjectLighthouse/StorableLists/Stores/UserFriendStore.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using LBPUnion.ProjectLighthouse.PlayerData.Profiles; -using LBPUnion.ProjectLighthouse.Types; namespace LBPUnion.ProjectLighthouse.StorableLists.Stores;