mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-07 12:28:39 +00:00
Send yourReview with slot request (#189)
This commit is contained in:
parent
9dc296a0f8
commit
58617df273
2 changed files with 6 additions and 4 deletions
|
@ -7,6 +7,7 @@ using LBPUnion.ProjectLighthouse.Helpers;
|
|||
using LBPUnion.ProjectLighthouse.Serialization;
|
||||
using LBPUnion.ProjectLighthouse.Types;
|
||||
using LBPUnion.ProjectLighthouse.Types.Levels;
|
||||
using LBPUnion.ProjectLighthouse.Types.Reviews;
|
||||
using LBPUnion.ProjectLighthouse.Types.Settings;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -99,7 +100,8 @@ public class SlotsController : ControllerBase
|
|||
|
||||
RatedLevel? ratedLevel = await this.database.RatedLevels.FirstOrDefaultAsync(r => r.SlotId == id && r.UserId == user.UserId);
|
||||
VisitedLevel? visitedLevel = await this.database.VisitedLevels.FirstOrDefaultAsync(r => r.SlotId == id && r.UserId == user.UserId);
|
||||
return this.Ok(slot.Serialize(gameVersion, ratedLevel, visitedLevel));
|
||||
Review? review = await this.database.Reviews.FirstOrDefaultAsync(r => r.SlotId == id && r.ReviewerId == user.UserId);
|
||||
return this.Ok(slot.Serialize(gameVersion, ratedLevel, visitedLevel, review));
|
||||
}
|
||||
|
||||
[HttpGet("slots/cool")]
|
||||
|
|
|
@ -201,9 +201,9 @@ public class User
|
|||
"planets",
|
||||
gameVersion switch
|
||||
{
|
||||
GameVersion.LittleBigPlanet2 => PlanetHashLBP2,
|
||||
GameVersion.LittleBigPlanet3 => PlanetHashLBP3,
|
||||
GameVersion.LittleBigPlanetVita => PlanetHashLBPVita,
|
||||
GameVersion.LittleBigPlanet2 => this.PlanetHashLBP2,
|
||||
GameVersion.LittleBigPlanet3 => this.PlanetHashLBP3,
|
||||
GameVersion.LittleBigPlanetVita => this.PlanetHashLBPVita,
|
||||
_ => "", // other versions do not have custom planets
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue