summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs')
-rw-r--r--extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs b/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs

index d49790a9..02bad394 100644 --- a/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs +++ b/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs
@@ -11,7 +11,7 @@ namespace Spacebar.GatewayOffload.Controllers; [Route("/_spacebar/offload/gateway/Identify")] public class IdentifyController(ILogger<IdentifyController> logger, SpacebarAuthenticationService authService, SpacebarDbContext db, IServiceProvider sp) : ControllerBase { [HttpPost("")] - public async IAsyncEnumerable<ReplicationMessage> DoIdentify(IdentifyRequest payload) { + public async IAsyncEnumerable<ContentlessReplicationMessage> DoIdentify(IdentifyRequest payload) { var user = await TraceResult.TraceAsync("getAuthUser", () => authService.GetCurrentUserAsync(payload.Token)); var session = await TraceResult.TraceAsync("getAuthSession", () => authService.GetCurrentSessionAsync(payload.Token)); @@ -37,12 +37,13 @@ public class IdentifyController(ILogger<IdentifyController> logger, SpacebarAuth } } - yield return new() { - Payload = new ReadyResponse { }, + yield return new ReplicationMessage<ReadyResponse>() { + Payload = new() { }, }; } - private ReplicationMessage Close(CloseCode closeCode) => new() { + // TODO: type? also, implement this in gateway lol + private ReplicationMessage<object?> Close(CloseCode closeCode) => new() { Origin = "IdentifyController", Event = "SB_GW_CLOSE", Payload = new {