fix #242 - module definitions not loading in Edit page
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user