fix #242 - module definitions not loading in Edit page

This commit is contained in:
Shaun Walker
2020-03-02 15:50:26 -06:00
parent a5afe8224a
commit 0405a2ab36
4 changed files with 24 additions and 25 deletions

View File

@ -36,15 +36,6 @@ namespace Oqtane.Controllers
return Themes.GetThemes();
}
// GET api/<controller>/filename
[HttpGet("{filename}")]
public IActionResult Get(string filename)
{
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
byte[] file = System.IO.File.ReadAllBytes(Path.Combine(binfolder, filename));
return File(file, "application/octet-stream", filename);
}
[HttpGet("install")]
[Authorize(Roles = Constants.HostRole)]
public void InstallThemes()
@ -80,5 +71,14 @@ namespace Oqtane.Controllers
InstallationManager.RestartApplication();
}
}
// GET api/<controller>/load/filename
[HttpGet("load/{filename}")]
public IActionResult Load(string filename)
{
string binfolder = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
byte[] file = System.IO.File.ReadAllBytes(Path.Combine(binfolder, filename));
return File(file, "application/octet-stream", filename);
}
}
}