using Microsoft.AspNetCore.Http; namespace Gott.Extensions; public static class HttpContextExtensions { public static string GetUserId(this HttpContext ctx) { return ctx.Items["UserId"] as string; } public static bool IsAdmin(this HttpContext ctx) { return ctx.Items["IsAdmin"] is true; } }