fixed ThemeController not handling empty-theme (default) properly
This commit is contained in:
parent
5192c9af7a
commit
0b18e1ac7e
|
@ -5,8 +5,14 @@ namespace Wave.Controllers;
|
|||
[ApiController]
|
||||
[Route("/theme")]
|
||||
public class ThemeController : ControllerBase {
|
||||
[HttpGet("")]
|
||||
public IActionResult SetTheme(string returnUrl = "") {
|
||||
Response.Cookies.Delete(".Wave.Theme");
|
||||
return LocalRedirect(string.IsNullOrWhiteSpace(returnUrl) ? "/" : returnUrl);
|
||||
}
|
||||
|
||||
[HttpGet("{theme}")]
|
||||
public IActionResult SetLanguage(string? theme, string returnUrl = "") {
|
||||
public IActionResult SetTheme(string? theme, string returnUrl = "") {
|
||||
if (theme is null) {
|
||||
Response.Cookies.Delete(".Wave.Theme");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue