add theme creator module to simplify the scaffolding of external themes

This commit is contained in:
Shaun Walker
2021-04-07 13:05:18 -04:00
parent d05747af1e
commit 1d3a79437c
20 changed files with 760 additions and 6 deletions

View File

@ -175,9 +175,9 @@ namespace Oqtane.Controllers
// GET: api/<controller>/templates
[HttpGet("templates")]
[Authorize(Roles = RoleNames.Host)]
public List<string> Get()
public List<string> GetTemplates()
{
var templates = new List<String>();
var templates = new List<string>();
string templatePath = Utilities.PathCombine(_environment.WebRootPath, "Modules", "Templates", Path.DirectorySeparatorChar.ToString());
foreach (string directory in Directory.GetDirectories(templatePath))
{
@ -186,7 +186,7 @@ namespace Oqtane.Controllers
return templates;
}
// POST api/<controller>?moduleid=x
// POST api/<controller>
[HttpPost]
[Authorize(Roles = RoleNames.Host)]
public ModuleDefinition Post([FromBody] ModuleDefinition moduleDefinition)