Changed api response "result" to "data"
This commit is contained in:
@@ -7,11 +7,11 @@ namespace AyaNova.Api.ControllerHelpers
|
||||
public class ApiCreatedResponse
|
||||
{
|
||||
|
||||
public object Result { get; }
|
||||
public object Data { get; }
|
||||
|
||||
public ApiCreatedResponse(object result)
|
||||
{
|
||||
Result = result;
|
||||
Data = result;
|
||||
}
|
||||
}//eoc
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace AyaNova.Api.ControllerHelpers
|
||||
public class ApiOkResponse
|
||||
{
|
||||
|
||||
public object Result { get; }
|
||||
public object Data { get; }
|
||||
|
||||
public ApiOkResponse(object result)
|
||||
{
|
||||
Result = result;
|
||||
Data = result;
|
||||
}
|
||||
}//eoc
|
||||
|
||||
|
||||
@@ -8,22 +8,15 @@ namespace AyaNova.Api.ControllerHelpers
|
||||
public class ApiOkWithPagingResponse<T>
|
||||
{
|
||||
|
||||
public object Result { get; }
|
||||
public object Data { get; }
|
||||
public object Paging { get; }
|
||||
|
||||
public ApiOkWithPagingResponse(ApiPagedResponse<T> pr)
|
||||
{
|
||||
Result = pr.items;
|
||||
Data = pr.items;
|
||||
Paging = pr.PageLinks;
|
||||
|
||||
}
|
||||
|
||||
// public ApiOkWithPagingResponse(object result, AyaNova.Models.PaginationLinkBuilder lb)
|
||||
// {
|
||||
// Result = result;
|
||||
// Paging = lb.PagingData();
|
||||
|
||||
// }
|
||||
}
|
||||
}//eoc
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace AyaNova.Api.Controllers
|
||||
[HttpGet("BuildMode")]
|
||||
public ActionResult BuildMode()
|
||||
{
|
||||
return Ok(new { result = new { BuildMode = "DEBUG" } });
|
||||
return Ok(new { data = new { BuildMode = "DEBUG" } });
|
||||
}
|
||||
#else
|
||||
/// <summary>
|
||||
@@ -96,7 +96,7 @@ namespace AyaNova.Api.Controllers
|
||||
[HttpGet("BuildMode")]
|
||||
public ActionResult BuildMode()
|
||||
{
|
||||
return Ok(new { result = new { BuildMode = "RELEASE" } });
|
||||
return Ok(new { data = new { BuildMode = "RELEASE" } });
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user