Erfolglose Antwort wird als unbefugt eingestuft
This commit is contained in:
parent
4f61f1b6cb
commit
dd18094deb
@ -22,8 +22,6 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
[HttpGet]
|
|
||||||
[Route("api/document/{envelopeKey}")]
|
|
||||||
public async Task<IActionResult> Get([FromRoute] string envelopeKey, [FromQuery] int index)
|
public async Task<IActionResult> Get([FromRoute] string envelopeKey, [FromQuery] int index)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -47,8 +45,8 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[Authorize]
|
||||||
[Route("api/document/{envelopeKey}")]
|
[HttpPost("api/document/{envelopeKey}")]
|
||||||
public async Task<IActionResult> Open(string envelopeKey)
|
public async Task<IActionResult> Open(string envelopeKey)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@ -22,7 +22,6 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
[HttpGet("api/envelope/{envelopeKey}")]
|
|
||||||
public async Task<IActionResult> Get([FromRoute] string envelopeKey)
|
public async Task<IActionResult> Get([FromRoute] string envelopeKey)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -48,6 +47,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
[HttpPost("api/envelope/{envelopeKey}")]
|
[HttpPost("api/envelope/{envelopeKey}")]
|
||||||
public async Task<IActionResult> Update(string envelopeKey, int index)
|
public async Task<IActionResult> Update(string envelopeKey, int index)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,7 +108,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
if(uuid is null || signature is null)
|
if(uuid is null || signature is null)
|
||||||
{
|
{
|
||||||
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[MessageKey.WrongEnvelopeReceiverId]);
|
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[MessageKey.WrongEnvelopeReceiverId]);
|
||||||
return BadRequest(_localizer[MessageKey.WrongEnvelopeReceiverId]);
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation($"Envelope UUID: [{uuid}]\nReceiver Signature: [{signature}]");
|
_logger.LogInformation($"Envelope UUID: [{uuid}]\nReceiver Signature: [{signature}]");
|
||||||
@ -174,7 +174,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
Fail: (messages, notices) =>
|
Fail: (messages, notices) =>
|
||||||
{
|
{
|
||||||
_logger.LogNotice(notices);
|
_logger.LogNotice(notices);
|
||||||
return notices.HasFlag(Flag.SecurityBreach) ? Forbid() : StatusCode(StatusCodes.Status500InternalServerError, messages.Join());
|
return Unauthorized();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@ -226,7 +226,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
|||||||
return Ok(new { EnvelopeUuid = envelopeUuid, ReceiverSignature = receiverSignature });
|
return Ok(new { EnvelopeUuid = envelopeUuid, ReceiverSignature = receiverSignature });
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("lang")]
|
[NonAction]
|
||||||
public IActionResult GetLanguage() => Ok(UserLanguage);
|
public IActionResult GetLanguage() => Ok(UserLanguage);
|
||||||
|
|
||||||
[HttpPost("lang")]
|
[HttpPost("lang")]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user