public DictaatPage EditDictaatPage(string dictaatName, DictaatPage page) { string path = _pathHelper.PagePath(dictaatName, page.Name); if (!_file.TryEditFile(path, page.Source)) { //wellicht in de toekomst 404 terug sturen? File not found? throw new Exceptions.PageNotFoundException(); } return(GetDictaatPage(dictaatName, page.Name)); }
public DictaatPage EditDictaatPage(string dictaatName, DictaatPage page) { string path = _pathHelper.PagePath(dictaatName, page.Name); //escape angular2 characters page.Source = page.Source.Replace("{", "{"); page.Source = page.Source.Replace("}", "}"); if (!_file.TryEditFile(path, page.Source)) { //wellicht in de toekomst 404 terug sturen? File not found? throw new Exceptions.PageNotFoundException(); } return(GetDictaatPage(dictaatName, page.Name)); }