private ActionResult CreateResource(string themeName, string container, string file, bool isDirectory, string contents, bool rewriteFile = false) { try { var resource = new ResourceCreator { ThemeName = themeName, Container = container, File = file, IsDirectory = isDirectory, Contents = contents, Rewrite = rewriteFile }; resource.Create(); } catch (ResourceCreateException ex) { return this.AjaxFail(ex.Message, HttpStatusCode.InternalServerError); } return Json(new {success = true}, JsonRequestBehavior.AllowGet); }
private ActionResult CreateResource(string themeName, string container, string file, bool isDirectory, string contents, bool rewriteFile = false) { try { var resource = new ResourceCreator { ThemeName = themeName, Container = container, File = file, IsDirectory = isDirectory, Contents = contents, Rewrite = rewriteFile }; resource.Create(this.Tenant); } catch(ResourceCreateException ex) { return this.Failed(ex.Message, HttpStatusCode.InternalServerError); } return this.Ok(); }