using DXPBLL.Party; using DXPDAL.Common; using DXPDAL.Party; using DXPSL.Common; using GB5Shared.DTO.Framework.Enum; using GB5Shared.DTO.Framework.ResponseStandard; namespace DXPSL.Endpoints.Party; // NOTE: open to any authenticated DXP user for Phase 1.1 testability — real party creation // should be admin/onboarding-gated (RBAC) before this goes further than Phase 1. Flagged here // deliberately rather than silently shipped as if it were already access-controlled. public class SaveParty : DXPBaseEndpoint> { private readonly IPartyBLL _bll; private readonly IDXPSystemContext _systemContext; public SaveParty(IPartyBLL bll, IDXPSystemContext systemContext) { _bll = bll; _systemContext = systemContext; } public override void Configure() => Post("/DXP/Party/SaveParty"); protected override async Task> ExecuteAsync( PartyDTO req, DXPCallerContext caller, CancellationToken ct) { var message = await _bll.SavePartyAsync(req, _systemContext.GetSystemLogin(caller.DxpUserId), ct); return new ResponseStandardDTO { Status = FrameworkEnumDTO.ResponseStatus.Ok, Body = message }; } }