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