changed all lambda experssion variables to z from various where appropriate
This commit is contained in:
@@ -80,7 +80,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObj == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
@@ -369,7 +369,7 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObj == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
@@ -431,7 +431,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//get user by key, if not found then reject
|
||||
//If user dlkeyexp has not expired then return file
|
||||
var DownloadUser = await ct.User.AsNoTracking().SingleOrDefaultAsync(m => m.DlKey == t && m.Active == true);
|
||||
var DownloadUser = await ct.User.AsNoTracking().SingleOrDefaultAsync(z => z.DlKey == t && z.Active == true);
|
||||
if (DownloadUser == null)
|
||||
{
|
||||
await Task.Delay(nFailedAuthDelay);//DOS protection
|
||||
@@ -450,7 +450,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Ok, user has a valid download key and it's not expired yet so get the attachment record
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var dbObj = await ct.FileAttachment.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObj == null)
|
||||
{
|
||||
await Task.Delay(nFailedAuthDelay);//fishing protection
|
||||
@@ -491,10 +491,10 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
async private Task<object> GetFileListForObjectAsync(AyaType ayaType, long ayaId)
|
||||
{
|
||||
var l = await ct.FileAttachment.AsNoTracking().Where(m => m.AttachToObjectId == ayaId && m.AttachToObjectType == ayaType)
|
||||
.Select(m => new { m.Id, m.Concurrency, m.ContentType, m.DisplayFileName, m.LastModified, m.Notes })
|
||||
var l = await ct.FileAttachment.AsNoTracking().Where(z => z.AttachToObjectId == ayaId && z.AttachToObjectType == ayaType)
|
||||
.Select(z => new { z.Id, z.Concurrency, z.ContentType, z.DisplayFileName, z.LastModified, z.Notes })
|
||||
.ToArrayAsync();
|
||||
var v = l.OrderBy(m => m.DisplayFileName);
|
||||
var v = l.OrderBy(z => z.DisplayFileName);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//Multiple users are allowed the same password and login
|
||||
//Salt will differentiate them so get all users that match login, then try to match pw
|
||||
var users = await ct.User.Where(m => m.Login == creds.Login && m.Active == true).ToListAsync();
|
||||
var users = await ct.User.Where(z => z.Login == creds.Login && z.Active == true).ToListAsync();
|
||||
|
||||
foreach (User u in users)
|
||||
{
|
||||
@@ -278,7 +278,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//Multiple users are allowed the same password and login
|
||||
//Salt will differentiate them so get all users that match login, then try to match pw
|
||||
var users = await ct.User.AsNoTracking().Where(m => m.Login == changecreds.LoginName).ToListAsync();
|
||||
var users = await ct.User.AsNoTracking().Where(z => z.Login == changecreds.LoginName).ToListAsync();
|
||||
|
||||
foreach (User u in users)
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
var oFromDb = await ct.TranslationItem.SingleOrDefaultAsync(m => m.Id == inObj.Id);
|
||||
var oFromDb = await ct.TranslationItem.SingleOrDefaultAsync(z => z.Id == inObj.Id);
|
||||
|
||||
if (oFromDb == null)
|
||||
{
|
||||
@@ -197,7 +197,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Now fetch translation for rights and to ensure not stock
|
||||
var oDbParent = await ct.Translation.SingleOrDefaultAsync(x => x.Id == oFromDb.TranslationId);
|
||||
var oDbParent = await ct.Translation.SingleOrDefaultAsync(z => z.Id == oFromDb.TranslationId);
|
||||
if (oDbParent == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
@@ -256,7 +256,7 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
var oFromDb = await ct.TranslationItem.AsNoTracking().SingleOrDefaultAsync(m => m.Id == inObj[0].Id);
|
||||
var oFromDb = await ct.TranslationItem.AsNoTracking().SingleOrDefaultAsync(z => z.Id == inObj[0].Id);
|
||||
|
||||
if (oFromDb == null)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Now fetch translation for rights and to ensure not stock
|
||||
var oDbParent = await ct.Translation.SingleOrDefaultAsync(x => x.Id == oFromDb.TranslationId);
|
||||
var oDbParent = await ct.Translation.SingleOrDefaultAsync(z => z.Id == oFromDb.TranslationId);
|
||||
if (oDbParent == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
@@ -315,7 +315,7 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
var oFromDb = await ct.Translation.SingleOrDefaultAsync(m => m.Id == inObj.Id);
|
||||
var oFromDb = await ct.Translation.SingleOrDefaultAsync(z => z.Id == inObj.Id);
|
||||
|
||||
if (oFromDb == null)
|
||||
{
|
||||
@@ -377,7 +377,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//Fetch translation and it's children
|
||||
//(fetch here so can return proper REST responses on failing basic validity)
|
||||
var dbObj = await ct.Translation.Include(x => x.TranslationItems).SingleOrDefaultAsync(m => m.Id == id);
|
||||
var dbObj = await ct.Translation.Include(z => z.TranslationItems).SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObj == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -129,7 +129,7 @@ namespace AyaNova.Api.Controllers
|
||||
// return BadRequest(new ApiErrorResponse(ModelState));
|
||||
// }
|
||||
|
||||
// var o = await ct.User.SingleOrDefaultAsync(m => m.Id == id);
|
||||
// var o = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
|
||||
|
||||
// if (o == null)
|
||||
// {
|
||||
@@ -238,7 +238,7 @@ namespace AyaNova.Api.Controllers
|
||||
//Instantiate the business object handler
|
||||
UserBiz biz = UserBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var dbObj = await ct.User.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var dbObj = await ct.User.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (dbObj == null)
|
||||
{
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
@@ -261,7 +261,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
private bool UserExists(long id)
|
||||
{
|
||||
return ct.User.Any(e => e.Id == id);
|
||||
return ct.User.Any(z => z.Id == id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
var UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||
|
||||
var o = await ct.UserOptions.SingleOrDefaultAsync(m => m.UserId == id);
|
||||
var o = await ct.UserOptions.SingleOrDefaultAsync(z => z.UserId == id);
|
||||
|
||||
if (o == null)
|
||||
{
|
||||
@@ -146,7 +146,7 @@ namespace AyaNova.Api.Controllers
|
||||
private bool UserOptionsExists(long id)
|
||||
{
|
||||
//NOTE: checks by UserId, NOT by Id as in most other objects
|
||||
return ct.UserOptions.Any(e => e.UserId == id);
|
||||
return ct.UserOptions.Any(z => z.UserId == id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.WorkOrderPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -269,7 +269,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.ItemPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -376,7 +376,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.ExpensePutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -484,7 +484,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.LaborPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -592,7 +592,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.LoanPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -698,7 +698,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PartPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -804,7 +804,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.PartRequestPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -910,7 +910,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.ScheduledUserPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -1016,7 +1016,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.TaskPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -1122,7 +1122,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.TravelPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -1228,7 +1228,7 @@ namespace AyaNova.Api.Controllers
|
||||
var o = await biz.UnitPutAsync(updatedObject);//In future may need to return entire object, for now just concurrency token
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(m => m.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
return StatusCode(409, new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
|
||||
Reference in New Issue
Block a user