feat(sender): route editor save and send through unified envelope upsert API
- expose POST /api/Envelope for sender-authenticated create/update/send operations - replace client draft-specific call with EnvelopeService.UpsertAsync(CreateEnvelopeCommand) - update sender editor save/send flow to persist draft first and send by envelope id - allow editor hydration without document by making sender document fetch nullable
This commit is contained in:
@@ -95,7 +95,6 @@ public class EnvelopeController : ControllerBase
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
[Authorize(AuthenticationSchemes = AuthScheme.Sender)]
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> CreateAsync([FromBody] CreateEnvelopeCommand command)
|
||||
@@ -124,11 +123,4 @@ public class EnvelopeController : ControllerBase
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
[Authorize(AuthenticationSchemes = AuthScheme.Sender)]
|
||||
[HttpPost("draft")]
|
||||
public async Task<IActionResult> SaveDraftAsync([FromBody] SaveEnvelopeDraftCommand command)
|
||||
{
|
||||
var result = await _mediator.Send(command.WithAuth(User.GetId()));
|
||||
return Ok(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user