2023-06-05 11:45:20 -04:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using BinaryDad.Notes.Services;
|
|
|
|
|
|
|
|
namespace BinaryDad.Notes.Controllers
|
|
|
|
{
|
2023-08-04 18:26:22 -04:00
|
|
|
[ApiController]
|
2023-06-05 11:45:20 -04:00
|
|
|
public class ApiController : ControllerBase
|
|
|
|
{
|
|
|
|
private readonly INoteService noteService;
|
|
|
|
|
2023-07-28 14:52:53 -04:00
|
|
|
public ApiController(INoteService noteService) => this.noteService = noteService;
|
2023-06-05 11:45:20 -04:00
|
|
|
|
2023-08-04 18:26:22 -04:00
|
|
|
[Route("note/{noteName}")]
|
2023-07-28 20:19:59 +00:00
|
|
|
public string Note(string noteName) => noteService.GetText(noteName);
|
2023-06-05 11:45:20 -04:00
|
|
|
}
|
|
|
|
}
|