mirror of
https://github.com/morbalint/kemkas.git
synced 2026-07-17 19:03:46 +00:00
41e894cd42
2e is hidden behind url navigation hiding, so hoping that nobody found it yet. Note: DB migration make this commit a bit risky!
23 lines
673 B
C#
23 lines
673 B
C#
using Kemkas.Web.Services.FirstEdition.Character;
|
|
using Kemkas.Web.Services.Shared;
|
|
using Kemkas.Web.ViewModels;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Kemkas.Web.Controllers;
|
|
|
|
/// <summary>
|
|
/// Shared first and second edition character endpoints
|
|
/// </summary>
|
|
/// <param name="persistenceService"></param>
|
|
[ApiController]
|
|
[Route("[controller]")]
|
|
public class CharacterController(ICharacterPersistenceService persistenceService) : ControllerBase
|
|
{
|
|
[HttpGet]
|
|
[Authorize]
|
|
public async Task<List<CharacterListItemDto>> GetAllCharacters()
|
|
{
|
|
return await persistenceService.GetAllCharactersOfUser();
|
|
}
|
|
} |