refactor(api): Vereinfachung der GetCurrentAsync-Methode im EnvelopeController
This commit is contained in:
@@ -24,9 +24,7 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var id = User.GetId();
|
if (User.GetId() is int intId)
|
||||||
|
|
||||||
if (id is int intId)
|
|
||||||
return await _envelopeService.ReadByIdAsync(intId).ThenAsync(
|
return await _envelopeService.ReadByIdAsync(intId).ThenAsync(
|
||||||
Success: Ok,
|
Success: Ok,
|
||||||
Fail: IActionResult (msg, ntc) =>
|
Fail: IActionResult (msg, ntc) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user