Gets member deleting working and adds refresh to each letter node.

This commit is contained in:
Shannon
2013-10-01 15:54:44 +10:00
parent 31a5951626
commit 770514919d
4 changed files with 24 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
@@ -135,5 +137,24 @@ namespace Umbraco.Web.Editors
return display;
}
/// <summary>
/// Permanently deletes a member
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public HttpResponseMessage DeleteByKey(Guid key)
{
var foundMember = Services.MemberService.GetByKey(key);
if (foundMember == null)
{
return HandleContentNotFound(key, false);
}
Services.MemberService.Delete(foundMember);
return Request.CreateResponse(HttpStatusCode.OK);
}
}
}

View File

@@ -85,6 +85,7 @@ namespace Umbraco.Web.Trees
}
menu.AddMenuItem<ActionDelete>();
menu.AddMenuItem<RefreshNode, ActionRefresh>(true);
return menu;
}
}