This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user