SES-131 Endpoint OtherEquipment #55

Merged
s426134 merged 3 commits from SES-131 into dev 2021-01-08 20:06:25 +01:00
3 changed files with 34 additions and 4 deletions
Showing only changes of commit 28a27472a8 - Show all commits

View File

@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Mvc;
using SessionCompanion.Services.Interfaces;
using SessionCompanion.ViewModels.OtherEquipmentViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SessionCompanion.Controllers
{
[Route("api/otherEquipment")]
[ApiController]
public class OtherEquipmentController : Controller
{
private readonly IOtherEquipmentService _service;
public OtherEquipmentController(IOtherEquipmentService service) => _service = service;
/// <summary>
/// Metoda zwraca wszystkie dostępne inne przedmioty
/// </summary>
/// <returns>Lista wszystkich innych przedmiotów w bazie danych</returns>
[HttpGet("getAllOtherEquipment")]
public async Task<List<OtherEquipmentViewModel>> GetOtherEquipment()
s426135 marked this conversation as resolved
Review

Brak Error Response

Brak Error Response
{
return _service.Get().ToList();
}
}
}

View File

@ -36,10 +36,6 @@
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SessionCompanion.Database\SessionCompanion.Database.csproj" />
<ProjectReference Include="..\SessionCompanion.Extensions\SessionCompanion.Extensions.csproj" />

View File

@ -31,6 +31,12 @@
<param name="characterId"> Id postaci </param>
<returns> Listę wszystkich statystyk </returns>
</member>
<member name="M:SessionCompanion.Controllers.OtherEquipmentController.GetOtherEquipment">
<summary>
Metoda zwraca wszystkie dostępne inne przedmioty
</summary>
<returns>Lista wszystkich innych przedmiotów w bazie danych</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