This commit is contained in:
2020-06-27 14:01:23 +00:00
parent 9c0f00fbb0
commit 50901186d3
27 changed files with 244 additions and 196 deletions

View File

@@ -260,8 +260,8 @@ namespace AyaNova.Api.Controllers
//Instantiate the business object handler
UserBiz biz = UserBiz.GetBiz(ct, HttpContext);
var dbObj = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
if (dbObj == null)
var dbObject = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
if (dbObject == null)
{
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
}
@@ -272,7 +272,7 @@ namespace AyaNova.Api.Controllers
}
if (!await biz.DeleteAsync(dbObj))
if (!await biz.DeleteAsync(dbObject))
{
return BadRequest(new ApiErrorResponse(biz.Errors));
}