feat(missions): /load/index materializes viewer mission/achievement state
EnsureCurrentAsync now takes viewerId (was Viewer), so it works with LoadController's AsNoTracking-loaded detached viewers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using SVSim.Database.Models;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Lazy-initializes viewer mission/achievement state. Idempotent. Called from
|
||||
/// LoadController on every /load/index and as belt-and-braces from /mission/info.
|
||||
/// Takes viewerId (not Viewer) so it works against both tracked and detached viewer loads.
|
||||
/// Caller is responsible for SaveChangesAsync.
|
||||
/// </summary>
|
||||
public interface IViewerMissionStateService
|
||||
{
|
||||
Task EnsureCurrentAsync(Viewer viewer, CancellationToken ct = default);
|
||||
Task EnsureCurrentAsync(long viewerId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user