This commit is contained in:
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
if (id == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, "id", "id can't be zero"));
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "id can't be zero"));
|
||||
|
||||
switch (ayaType)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ namespace AyaNova.Api.Controllers
|
||||
AyaTypeId TypeId = await WorkOrderBiz.GetAncestor(ayaType, id, ct);
|
||||
return Ok(ApiOkResponse.Response(new { AyaType = TypeId.ObjectTypeAsInt, Id = TypeId.ObjectId }));
|
||||
default:
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, "ayaType", "Only types with ancestors are valid"));
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "Only types with ancestors are valid"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user