fix: reduce endpoint nullability warnings
TaxBaik CI/CD / build-and-deploy (push) Failing after 5m10s
TaxBaik CI/CD / build-and-deploy (push) Failing after 5m10s
This commit is contained in:
@@ -62,9 +62,9 @@ public class GetUpcomingEndpoint : Endpoint<GetUpcomingQuery, TaxFilingListRespo
|
||||
var filings = await _service.GetUpcomingAsync(request.DaysAhead);
|
||||
await SendAsync(new TaxFilingListResponse { Data = filings.Cast<object>().ToList() }, 200, cancellation: ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message, statusCode: 500);
|
||||
ThrowError("예정 신고 조회 실패", statusCode: 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,9 +88,9 @@ public class GetByClientIdEndpoint : Endpoint<EmptyRequest, TaxFilingListRespons
|
||||
var filings = await _service.GetByClientIdAsync(clientId);
|
||||
await SendAsync(new TaxFilingListResponse { Data = filings.Cast<object>().ToList() }, 200, cancellation: ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message, statusCode: 500);
|
||||
ThrowError("고객별 신고 조회 실패", statusCode: 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,9 +116,9 @@ public class GetByIdEndpoint : Endpoint<EmptyRequest, object>
|
||||
ThrowError("신고 일정을 찾을 수 없습니다.", statusCode: 404);
|
||||
await SendAsync(filing, 200, cancellation: ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message, statusCode: 500);
|
||||
ThrowError("신고 상세 조회 실패", statusCode: 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -141,18 +141,18 @@ public class CreateEndpoint : Endpoint<CreateTaxFilingRequest, TaxFilingResponse
|
||||
var filing = new TaxFilingEntity
|
||||
{
|
||||
ClientId = request.ClientId,
|
||||
FilingType = request.FilingType,
|
||||
FilingType = request.FilingType ?? string.Empty,
|
||||
DueDate = request.DueDate,
|
||||
Status = request.Status,
|
||||
Status = request.Status ?? "pending",
|
||||
Memo = request.Memo
|
||||
};
|
||||
var filingId = await _service.CreateAsync(filing);
|
||||
var result = await _service.GetByIdAsync(filingId);
|
||||
await SendAsync(new TaxFilingResponse { Id = filingId }, 201, cancellation: ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message);
|
||||
ThrowError("신고 생성 실패");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,9 +176,9 @@ public class UpdateEndpoint : Endpoint<UpdateTaxFilingRequest, TaxFilingUpdateRe
|
||||
var filing = new TaxFilingEntity
|
||||
{
|
||||
Id = id,
|
||||
FilingType = request.FilingType,
|
||||
FilingType = request.FilingType ?? string.Empty,
|
||||
DueDate = request.DueDate ?? DateTime.Now,
|
||||
Status = request.Status,
|
||||
Status = request.Status ?? "pending",
|
||||
Memo = request.Memo
|
||||
};
|
||||
await _service.UpdateAsync(filing);
|
||||
@@ -187,9 +187,9 @@ public class UpdateEndpoint : Endpoint<UpdateTaxFilingRequest, TaxFilingUpdateRe
|
||||
ThrowError("신고 일정을 찾을 수 없습니다.", statusCode: 404);
|
||||
await SendAsync(new TaxFilingUpdateResponse { Message = "신고 일정이 수정되었습니다." }, 200, cancellation: ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message);
|
||||
ThrowError("신고 수정 실패");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,9 +213,9 @@ public class DeleteEndpoint : Endpoint<EmptyRequest, EmptyResponse>
|
||||
await _service.DeleteAsync(id);
|
||||
await SendNoContentAsync(ct);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
ThrowError(ex.Message);
|
||||
ThrowError("신고 삭제 실패");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user