Rename ConcurrencyToken to Concurrency
This commit is contained in:
@@ -136,7 +136,7 @@ And this response:
|
||||
"data": [
|
||||
{
|
||||
"id": 99,
|
||||
"concurrencyToken": 4125297,
|
||||
"concurrency": 4125297,
|
||||
"name": "Gorgeous Wooden Chips 123",
|
||||
"serial": 99,
|
||||
"dollarAmount": 141.04,
|
||||
@@ -153,7 +153,7 @@ And this response:
|
||||
},
|
||||
{
|
||||
"id": 98,
|
||||
"concurrencyToken": 4125290,
|
||||
"concurrency": 4125290,
|
||||
"name": "Tasty Rubber Towels 122",
|
||||
"serial": 98,
|
||||
"dollarAmount": 736.05,
|
||||
@@ -190,7 +190,7 @@ Download
|
||||
"data": [
|
||||
{
|
||||
"id": 99,
|
||||
"concurrencyToken": 3902247,
|
||||
"concurrency": 3902247,
|
||||
"name": "Awesome Wooden Shirt 123",
|
||||
"serial": 99,
|
||||
"dollarAmount": 630.45,
|
||||
@@ -207,7 +207,7 @@ Download
|
||||
},
|
||||
{
|
||||
"id": 98,
|
||||
"concurrencyToken": 3902238,
|
||||
"concurrency": 3902238,
|
||||
"name": "Awesome Cotton Keyboard 122",
|
||||
"serial": 98,
|
||||
"dollarAmount": 926.28,
|
||||
@@ -226,7 +226,7 @@ Download
|
||||
},
|
||||
{
|
||||
"id": 97,
|
||||
"concurrencyToken": 3902230,
|
||||
"concurrency": 3902230,
|
||||
"name": "Rustic Granite Pizza 121",
|
||||
"serial": 97,
|
||||
"dollarAmount": 742.41,
|
||||
@@ -305,7 +305,7 @@ Download
|
||||
"data": [
|
||||
{
|
||||
"id": 100,
|
||||
"concurrencyToken": 3903699,
|
||||
"concurrency": 3903699,
|
||||
"name": "Licensed Granite Cheese 124",
|
||||
"serial": 100,
|
||||
"dollarAmount": 764.57,
|
||||
|
||||
@@ -51,10 +51,10 @@ namespace AyaNova.Api.Controllers
|
||||
/// Get form customizations for Client form display
|
||||
/// </summary>
|
||||
/// <param name="formkey">The official form key used by AyaNova</param>
|
||||
/// <param name="concurrencyToken">A prior concurrency token used to check if there are any changes without using up bandwidth sending unnecessary data</param>
|
||||
/// <param name="concurrency">A prior concurrency token used to check if there are any changes without using up bandwidth sending unnecessary data</param>
|
||||
/// <returns>A single FormCustom or nothing and a header 304 not modified</returns>
|
||||
[HttpGet("{formkey}")]
|
||||
public async Task<IActionResult> GetFormCustom([FromRoute] string formkey, [FromQuery] uint? concurrencyToken)
|
||||
public async Task<IActionResult> GetFormCustom([FromRoute] string formkey, [FromQuery] uint? concurrency)
|
||||
{
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
@@ -75,9 +75,9 @@ namespace AyaNova.Api.Controllers
|
||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
|
||||
//If concurrency token specified then check if ours is newer
|
||||
if (concurrencyToken != null)
|
||||
if (concurrency != null)
|
||||
{
|
||||
if (o.Concurrency == concurrencyToken)
|
||||
if (o.Concurrency == concurrency)
|
||||
{
|
||||
//returns a code 304 (NOT MODIFIED)
|
||||
return StatusCode(304);
|
||||
|
||||
Reference in New Issue
Block a user