diff options
| author | ivar <i@oiee.no> | 2025-12-02 22:38:23 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-12-02 22:38:23 +0100 |
| commit | 68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec (patch) | |
| tree | efab90e59deae00953704059efdec14cb3ad81c7 /api/WhatApi/Middleware | |
| parent | d2089c0038460504869b27203143e40441a86eff (diff) | |
| download | what-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.tar.xz what-68ffad06a6cfd2cd2015ab03fb82bf69629dd7ec.zip | |
Move off razor pages
Diffstat (limited to 'api/WhatApi/Middleware')
| -rw-r--r-- | api/WhatApi/Middleware/UserLastSeenMiddleware.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/WhatApi/Middleware/UserLastSeenMiddleware.cs b/api/WhatApi/Middleware/UserLastSeenMiddleware.cs index e52f890..5c7f1e7 100644 --- a/api/WhatApi/Middleware/UserLastSeenMiddleware.cs +++ b/api/WhatApi/Middleware/UserLastSeenMiddleware.cs @@ -2,9 +2,9 @@ using System.Security.Claims; namespace WhatApi.Middleware; -public class UserLastSeenMiddleware(RequestDelegate next, Database db) +public class UserLastSeenMiddleware(RequestDelegate next) { - public async Task InvokeAsync(HttpContext context) { + public async Task InvokeAsync(HttpContext context,Database db) { var userIdString = context.User.FindFirstValue(ClaimTypes.NameIdentifier); if (Guid.TryParse(userIdString, out var userId)) { var user = await db.Users.FirstOrDefaultAsync(c => c.Id == userId); |
