U4-8416 Empty recycle bin does not refresh or gives feedback to user
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using System.Web.Http.Results;
|
||||
using Microsoft.Owin;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
@@ -124,6 +125,22 @@ namespace Umbraco.Web.WebApi
|
||||
return request.CreateValidationErrorResponse(notificationModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a succressful response with notifications in the result to be displayed in the UI
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="successMessage"></param>
|
||||
/// <returns></returns>
|
||||
public static HttpResponseMessage CreateNotificationSuccessResponse(this HttpRequestMessage request, string successMessage)
|
||||
{
|
||||
var notificationModel = new SimpleNotificationModel
|
||||
{
|
||||
Message = successMessage
|
||||
};
|
||||
notificationModel.AddSuccessNotification(successMessage, string.Empty);
|
||||
return request.CreateResponse(HttpStatusCode.OK, notificationModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a 400 response message indicating that a validation error occurred
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user