Change redis object prefix

This commit is contained in:
Slendy 2023-01-10 21:50:13 -06:00
parent 4bb3183c1e
commit 73a871f187
No known key found for this signature in database
GPG key ID: 7288D68361B91428
3 changed files with 5 additions and 12 deletions

View file

@ -66,14 +66,9 @@ public class FriendsController : ControllerBase
[HttpGet("myFriends")]
public async Task<IActionResult> MyFriends()
{
(User, GameToken)? userAndToken = await this.database.UserAndGameTokenFromRequest(this.Request);
GameToken token = this.GetToken();
if (userAndToken == null) return this.StatusCode(403, "");
User user = userAndToken.Value.Item1;
GameToken gameToken = userAndToken.Value.Item2;
UserFriendData? friendStore = UserFriendStore.GetUserFriendData(user.UserId);
UserFriendData? friendStore = UserFriendStore.GetUserFriendData(token.UserId);
if (friendStore == null)
return this.Ok(LbpSerializer.BlankElement("myFriends"));
@ -84,7 +79,7 @@ public class FriendsController : ControllerBase
User? friend = await this.database.Users.Include(u => u.Location).FirstOrDefaultAsync(u => u.UserId == friendId);
if (friend == null) continue;
friends += friend.Serialize(gameToken.GameVersion);
friends += friend.Serialize(token.GameVersion);
}
return this.Ok(LbpSerializer.StringElement("myFriends", friends));