Class SiteController
- Namespace
- Oqtane.Controllers
- Assembly
- Oqtane.Server.dll
[Route("api/[controller]")]
public class SiteController : Controller
- Inheritance
-
object
ControllerBase
Controller
SiteController
Constructors
SiteController(ISiteService, ILogManager)
public SiteController(ISiteService siteService, ILogManager logger)
Parameters
siteService
ISiteService
logger
ILogManager
Methods
Delete(int)
[HttpDelete("{id}")]
[Authorize(Roles = "Host Users")]
public Task Delete(int id)
Parameters
id
int
Returns
- Task
Get()
[HttpGet]
[Authorize(Roles = "Host Users")]
public Task<IEnumerable<Site>> Get()
Returns
- Task<IEnumerable<Site>>
Get(int)
[HttpGet("{id}")]
public Task<Site> Get(int id)
Parameters
id
int
Returns
- Task<Site>
GetModules(int, int)
[HttpGet("modules/{siteId}/{pageId}")]
public Task<IEnumerable<Module>> GetModules(int siteId, int pageId)
Parameters
siteId
int
pageId
int
Returns
- Task<IEnumerable<Module>>
Post(Site)
[HttpPost]
[Authorize(Roles = "Host Users")]
public Task<Site> Post(Site site)
Parameters
site
Site
Returns
- Task<Site>
Put(int, Site)
[HttpPut("{id}")]
[Authorize(Roles = "Administrators")]
public Task<Site> Put(int id, Site site)
Parameters
id
int
site
Site
Returns
- Task<Site>