syntax
This commit is contained in:
@@ -515,11 +515,16 @@ namespace Umbraco.Web.Editors
|
||||
[HttpPost]
|
||||
public SimpleNotificationModel CreateBlueprintFromContent([FromUri]int contentId, [FromUri]string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value cannot be null or whitespace.", "name");
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
throw new ArgumentException("Value cannot be null or whitespace.", "name");
|
||||
}
|
||||
|
||||
var content = Services.ContentService.GetById(contentId);
|
||||
if (content == null)
|
||||
{
|
||||
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
|
||||
}
|
||||
|
||||
EnsureUniqueName(name, content, "name");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user