Add score logging, friend scores, and fix case processing

This commit is contained in:
Slendy 2022-09-03 02:39:51 -05:00
parent fddef506c8
commit 22905d419c
No known key found for this signature in database
GPG key ID: 7288D68361B91428
6 changed files with 91 additions and 20 deletions

View file

@ -4,9 +4,7 @@ using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.PlayerData;
using LBPUnion.ProjectLighthouse.PlayerData.Profiles;
using LBPUnion.ProjectLighthouse.Serialization;
using LBPUnion.ProjectLighthouse.StorableLists;
using LBPUnion.ProjectLighthouse.StorableLists.Stores;
using LBPUnion.ProjectLighthouse.Types;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@ -56,8 +54,7 @@ public class FriendsController : ControllerBase
blockedUsers.Add(blockedUser.UserId);
}
UserFriendData? friendStore = UserFriendStore.GetUserFriendData(token.UserId);
if (friendStore == null) friendStore = UserFriendStore.CreateUserFriendData(token.UserId);
UserFriendData friendStore = UserFriendStore.GetUserFriendData(token.UserId) ?? UserFriendStore.CreateUserFriendData(token.UserId);
friendStore.FriendIds = friends.Select(u => u.UserId).ToList();
friendStore.BlockedIds = blockedUsers;