using EnablementBLL.ShowSpace; using EnablementSL.Parameters.ShowSpaceSubscription; using FastEndpoints; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; using GB5Shared.FastEndPoint; namespace EnablementSL.Endpoints.ShowSpaceSubscription; // Backs the "My Subscriptions" header popover's Spaces section — no UserId param, same // convention as GbMyActivityDbService's endpoints: the server resolves "me" from the // Login header. public class GetMySpaces : BaseEndpoint> { private readonly IShowSpaceSubscriptionBLL _bll; public GetMySpaces(IShowSpaceSubscriptionBLL bll) => _bll = bll; public override void Configure() { Get("/Enablement/GetMySpaces"); AllowAnonymous(); } protected override string? GetCacheKey(GetMySpacesParameters req, LoginDTO login) => null; protected override async Task> ExecuteAsync( GetMySpacesParameters req, LoginDTO login, CancellationToken ct) => await _bll.GetMySpacesAsync(login, ct).ConfigureAwait(false); }