Erfolglose Antwort wird als unbefugt eingestuft

This commit is contained in:
Developer 02
2024-05-08 16:04:53 +02:00
parent 4f61f1b6cb
commit dd18094deb
3 changed files with 6 additions and 8 deletions

View File

@@ -108,7 +108,7 @@ namespace EnvelopeGenerator.Web.Controllers
if(uuid is null || signature is null)
{
_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}]");
@@ -174,7 +174,7 @@ namespace EnvelopeGenerator.Web.Controllers
Fail: (messages, notices) =>
{
_logger.LogNotice(notices);
return notices.HasFlag(Flag.SecurityBreach) ? Forbid() : StatusCode(StatusCodes.Status500InternalServerError, messages.Join());
return Unauthorized();
});
}
catch(Exception ex)
@@ -226,7 +226,7 @@ namespace EnvelopeGenerator.Web.Controllers
return Ok(new { EnvelopeUuid = envelopeUuid, ReceiverSignature = receiverSignature });
}
[HttpGet("lang")]
[NonAction]
public IActionResult GetLanguage() => Ok(UserLanguage);
[HttpPost("lang")]