diff --git a/common/ASC.Api.Core/Middleware/CommonApiResponse.cs b/common/ASC.Api.Core/Middleware/CommonApiResponse.cs index d0de60efc8..4fc1ebacea 100644 --- a/common/ASC.Api.Core/Middleware/CommonApiResponse.cs +++ b/common/ASC.Api.Core/Middleware/CommonApiResponse.cs @@ -104,6 +104,8 @@ public class SuccessApiResponse : CommonApiResponse } } + public List Links { get; set; } + public SuccessApiResponse() { @@ -114,6 +116,15 @@ public class SuccessApiResponse : CommonApiResponse Status = 0; _httpContext = httpContext; Response = response; + + Links = new List(1) + { + new Link() + { + Href = httpContext.Request.GetUrlRewriter().ToString(), + Action = httpContext.Request.Method + } + }; } } @@ -141,3 +152,9 @@ public class CommonApiError return result; } } + +public class Link +{ + public string Href { get; set; } + public string Action { get; set; } +}