Initial backend draft
This commit is contained in:
parent
b6293beeec
commit
84ad96d628
18 changed files with 148 additions and 0 deletions
25
backend/Controllers/ItemController.cs
Normal file
25
backend/Controllers/ItemController.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using JellyGlass.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace JellyGlass.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class ItemController : ControllerBase
|
||||
{
|
||||
private ILogger<ItemController> _logger;
|
||||
private IItemService _service;
|
||||
|
||||
public ItemController(ILogger<ItemController> logger, IItemService service)
|
||||
{
|
||||
_service = service;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> GetItemsForLibrary(string libraryId)
|
||||
{
|
||||
var items = await _service.GetItemsFromLibrary(libraryId);
|
||||
|
||||
return Ok(items);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue