Major refactor and reorganization of types (#652)

* Start of reorganization and cleanup

* Remove duplicate title id

* Refactor types

* Fix Release building

* Move classes in /Types to a Types namespace

* Fix compilation error (RoomVisualizerPage strikes again)

* Fix bugs created from auto merge

* Fix auto-merge compilation error

* Changes from review/fix failed merge
This commit is contained in:
Josh 2023-02-13 22:02:58 -06:00 committed by GitHub
parent c8120b3388
commit f1c5ad4002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
316 changed files with 1623 additions and 1518 deletions

View file

@ -1,11 +1,11 @@
#nullable enable
using LBPUnion.ProjectLighthouse.Administration;
using LBPUnion.ProjectLighthouse.Extensions;
using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.Levels;
using LBPUnion.ProjectLighthouse.PlayerData;
using LBPUnion.ProjectLighthouse.PlayerData.Reviews;
using LBPUnion.ProjectLighthouse.Serialization;
using LBPUnion.ProjectLighthouse.Types.Entities.Interaction;
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
using LBPUnion.ProjectLighthouse.Types.Entities.Token;
using LBPUnion.ProjectLighthouse.Types.Users;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@ -117,7 +117,7 @@ public class ReviewController : ControllerBase
review.Text = newReview.Text;
review.Deleted = false;
review.Timestamp = TimeHelper.UnixTimeMilliseconds();
review.Timestamp = TimeHelper.TimestampMillis;
// sometimes the game posts/updates a review rating without also calling dpadrate/user/etc (why??)
RatedLevel? ratedLevel = await this.database.RatedLevels.FirstOrDefaultAsync(r => r.SlotId == slotId && r.UserId == token.UserId);