Add endpoint for characterBasicInfo
This commit is contained in:
parent
527a3f695f
commit
0cb1a61c3a
@ -88,5 +88,22 @@ namespace SessionCompanion.Controllers
|
||||
var statistics = await _service.GetCharacterStatistics(characterId);
|
||||
return statistics;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metoda zwraca podstawowe informacje dla danej postaci
|
||||
/// </summary>
|
||||
/// <param name="characterId"></param>
|
||||
/// <returns>Podstawowe informacje dla danej postaci</returns>
|
||||
[HttpGet("characterBasicInfo")]
|
||||
public async Task<Either<CharacterBasicInfoViewModel, ErrorResponse>> GetCharacterBasicInfo([Required] int characterId)
|
||||
{
|
||||
var info = await _service.GetBasicCharacterbasicInfo(characterId);
|
||||
if (info is null)
|
||||
return new ErrorResponse() {
|
||||
Message = "No characters with given id",
|
||||
StatusCode = 204
|
||||
};
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
@ -31,6 +31,13 @@
|
||||
<param name="characterId"> Id postaci </param>
|
||||
<returns> Listę wszystkich statystyk </returns>
|
||||
</member>
|
||||
<member name="M:SessionCompanion.Controllers.CharacterController.GetCharacterBasicInfo(System.Int32)">
|
||||
<summary>
|
||||
Metoda zwraca podstawowe informacje dla danej postaci
|
||||
</summary>
|
||||
<param name="characterId"></param>
|
||||
<returns>Podstawowe informacje dla danej postaci</returns>
|
||||
</member>
|
||||
<member name="M:SessionCompanion.Controllers.UserController.Login(System.String,System.String)">
|
||||
<summary>
|
||||
Metoda przyjmuje login oraz hasło i sprawdza czy istnieje użytkownik o podanych parametrach
|
||||
|
Loading…
Reference in New Issue
Block a user