mirror of
https://github.com/bitwarden/server
synced 2026-01-10 12:33:49 +00:00
Create PlayData table and services
Shift from seeded data tracking that is all server-side to play ids and x-play-id headers that are appended from the clients to track entities added by tests.
This commit is contained in:
17
src/SharedWeb/Utilities/PlayIdMiddleware.cs
Normal file
17
src/SharedWeb/Utilities/PlayIdMiddleware.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Bit.Core.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Bit.SharedWeb.Utilities;
|
||||
|
||||
public sealed class PlayIdMiddleware(RequestDelegate next)
|
||||
{
|
||||
public Task Invoke(HttpContext context, IPlayIdService playIdService)
|
||||
{
|
||||
if (context.Request.Headers.TryGetValue("x-play-id", out var playId))
|
||||
{
|
||||
playIdService.PlayId = playId;
|
||||
}
|
||||
|
||||
return next(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user