SES-118 Added Controller
This commit is contained in:
parent
6ca10bd803
commit
ca0bbe22a4
@ -8,6 +8,7 @@ using SessionCompanion.ViewModels.CharacterViewModels;
|
|||||||
namespace SessionCompanion.Controllers
|
namespace SessionCompanion.Controllers
|
||||||
{
|
{
|
||||||
using SessionCompanion.Hubs;
|
using SessionCompanion.Hubs;
|
||||||
|
using SessionCompanion.ViewModels.UniversalModels;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -78,13 +79,20 @@ namespace SessionCompanion.Controllers
|
|||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Metoda zwraca wszystkie statystyki dla danej postaci
|
/// Metoda zwraca wszystkie statystyki dla danej postaci
|
||||||
|
/// Zwracane statystyki dla:
|
||||||
|
/// Charisma
|
||||||
|
/// Constitution
|
||||||
|
/// Dexterity
|
||||||
|
/// Intelligence
|
||||||
|
/// Strength
|
||||||
|
/// Wisdom
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="characterId"></param>
|
/// <param name="characterId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("characterStats")]
|
[HttpGet("characterStats")]
|
||||||
public async Task<Either<CharacterEveryStatViewModel, ErrorResponse>> GetCharacterEveryStat(int characterId)
|
public async Task<Either<List<UniversalStatisticViewModel>, ErrorResponse>> GetCharacterEveryStat([Required] int characterId)
|
||||||
{
|
{
|
||||||
var statistics = await _service.GetCharacterEveryStat(characterId);
|
var statistics = await _service.GetCharacterStatistics(characterId);
|
||||||
return statistics;
|
return statistics;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,13 @@
|
|||||||
<member name="M:SessionCompanion.Controllers.CharacterController.GetCharacterEveryStat(System.Int32)">
|
<member name="M:SessionCompanion.Controllers.CharacterController.GetCharacterEveryStat(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Metoda zwraca wszystkie statystyki dla danej postaci
|
Metoda zwraca wszystkie statystyki dla danej postaci
|
||||||
|
Zwracane statystyki dla:
|
||||||
|
Charisma
|
||||||
|
Constitution
|
||||||
|
Dexterity
|
||||||
|
Intelligence
|
||||||
|
Strength
|
||||||
|
Wisdom
|
||||||
</summary>
|
</summary>
|
||||||
<param name="characterId"></param>
|
<param name="characterId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
|
Loading…
Reference in New Issue
Block a user