Table of Contents

Class ThemeController

Namespace
Oqtane.Controllers
Assembly
Oqtane.Server.dll
[Route("api/[controller]")]
public class ThemeController : Controller
Inheritance
ThemeController

Constructors

ThemeController(IThemeRepository, IInstallationManager, IWebHostEnvironment, ITenantManager, ISyncManager, ILogManager, IServiceProvider)

public ThemeController(IThemeRepository themes, IInstallationManager installationManager, IWebHostEnvironment environment, ITenantManager tenantManager, ISyncManager syncManager, ILogManager logger, IServiceProvider serviceProvider)

Parameters

themes IThemeRepository
installationManager IInstallationManager
environment IWebHostEnvironment
tenantManager ITenantManager
syncManager ISyncManager
logger ILogManager
serviceProvider IServiceProvider

Methods

Delete(string)

[HttpDelete("{themename}")]
[Authorize(Roles = "Host Users")]
public void Delete(string themename)

Parameters

themename string

Get()

[HttpGet]
[Authorize(Roles = "Registered Users")]
public IEnumerable<Theme> Get()

Returns

IEnumerable<Theme>

Get(int, string)

[HttpGet("{id}")]
public Theme Get(int id, string siteid)

Parameters

id int
siteid string

Returns

Theme

GetTemplates()

[HttpGet("templates")]
[Authorize(Roles = "Host Users")]
public List<Template> GetTemplates()

Returns

List<Template>

Post(Theme)

[HttpPost]
[Authorize(Roles = "Host Users")]
public Theme Post(Theme theme)

Parameters

theme Theme

Returns

Theme

Put(int, Theme)

[HttpPut("{id}")]
[Authorize(Roles = "Administrators")]
public void Put(int id, Theme theme)

Parameters

id int
theme Theme